Skip to content

Commit

Permalink
improvement: generate default oauth2RedirectUrl based on page locatio…
Browse files Browse the repository at this point in the history
…n, including the path (an omission of swagger-api#5085)
  • Loading branch information
astellingwerf committed Aug 28, 2021
1 parent 65c3fb7 commit f119a00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function SwaggerUI(opts) {
maxDisplayedTags: null,
filter: null,
validatorUrl: "https://validator.swagger.io/validator",
oauth2RedirectUrl: `${window.location.protocol}//${window.location.host}${window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/'))}/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: {},
Expand Down

0 comments on commit f119a00

Please sign in to comment.