fix(oauth2): generate default oauth2RedirectUrl based on page location and path (#7476)
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
This commit is contained in:
committed by
GitHub
parent
a0e9923dd5
commit
a89c90ec77
@@ -31,7 +31,7 @@ export default function SwaggerUI(opts) {
|
||||
maxDisplayedTags: null,
|
||||
filter: null,
|
||||
validatorUrl: "https://validator.swagger.io/validator",
|
||||
oauth2RedirectUrl: `${window.location.protocol}//${window.location.host}/oauth2-redirect.html`,
|
||||
oauth2RedirectUrl: `${window.location.protocol}//${window.location.host}${window.location.pathname.substring(0, window.location.pathname.lastIndexOf("/"))}/oauth2-redirect.html`,
|
||||
persistAuthorization: false,
|
||||
configs: {},
|
||||
custom: {},
|
||||
|
||||
Reference in New Issue
Block a user