We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae492c7 commit a525d08Copy full SHA for a525d08
src/templates/core/xhr/getHeaders.hbs
@@ -6,6 +6,11 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio
6
resolve(options, config.HEADERS),
7
]);
8
9
+ if (!isStringWithValue(token)) {
10
+ const SESSION_KEY = '_anyroad_embedded_session_key';
11
+ token = document?.cookie?.split('; ').find(row => row.startsWith(`${SESSION_KEY}=`))?.split('=')[1];
12
+ }
13
+
14
const headers = Object.entries({
15
Accept: 'application/json',
16
...additionalHeaders,
0 commit comments