Files
swagger-ui/src/core/config/sources/runtime.js
kyy f464ba2d31
Some checks failed
Node.js CI / build (push) Failing after 2s
Node.js CI / e2e-tests (+(a11y|security|bugs)/**/*cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/!(o|d|m)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/+(o|d)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/m*.cy.js) (push) Failing after 2s
CodeQL / Analyze (javascript) (push) Failing after 1m15s
Security scan for docker image / build (push) Failing after 59s
Update swagger-ui
2025-06-24 13:40:26 +09:00

19 lines
445 B
JavaScript
Executable File

/**
* @prettier
*
* Receives options at runtime.
*/
/* eslint-disable no-undef */
const optionsFromRuntime = () => () => {
const options = {}
if (globalThis.location) {
options.oauth2RedirectUrl = `${globalThis.location.protocol}//${globalThis.location.host}${globalThis.location.pathname.substring(0, globalThis.location.pathname.lastIndexOf("/"))}/oauth2-redirect.html`
}
return options
}
export default optionsFromRuntime