File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,16 @@ export interface MiddlewareOptions {
44 endpointUrl : string ;
55 displayOptions ?: object ;
66 headersJS ?: string ;
7+ credentials ?: string ;
78}
89
910export default function renderVoyagerPage ( options : MiddlewareOptions ) {
10- const { endpointUrl, displayOptions } = options ;
11- const headersJS = options . headersJS ? options . headersJS : '{}' ;
11+ const {
12+ endpointUrl,
13+ displayOptions,
14+ headersJS = '{}' ,
15+ credentials = 'include' ,
16+ } = options ;
1217 return `
1318<!DOCTYPE html>
1419<html>
@@ -50,7 +55,7 @@ export default function renderVoyagerPage(options: MiddlewareOptions) {
5055 'Content-Type': 'application/json',
5156 }, ${ headersJS } ),
5257 body: JSON.stringify({query: introspectionQuery }),
53- credentials: 'include' ,
58+ credentials: ${ credentials } ,
5459 }).then(function (response) {
5560 return response.text();
5661 }).then(function (responseBody) {
You can’t perform that action at this time.
0 commit comments