fix(auth): fix the issue with oauth at a non root path (#3840)
This commit is contained in:
1 parent
74c98b6e9f
commit
6651008fbb
22 files changed
+148
-80
No files matched your search
@@ -166,6 +166,7 @@ module.exports = (env, argv) => {
|
||||
//writeToDisk: true,
|
||||
historyApiFallback: {
|
||||
disableDotRule: true,
|
||||
index: PUBLIC_URL + 'index.html',
|
||||
},
|
||||
headers: {
|
||||
'Cross-Origin-Embedder-Policy': 'require-corp',
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
"@cornerstonejs/codec-charls": "^1.2.3",
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.32.2",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.5",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.36.1",
|
||||
"@ohif/core": "3.8.0-beta.26",
|
||||
"@ohif/extension-cornerstone": "3.8.0-beta.26",
|
||||
"@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.26",
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"rewrites": [{ "source": "*", "destination": "index.html" }],
|
||||
"headers": [
|
||||
{
|
||||
"source": "**/*",
|
||||
"headers": [
|
||||
{ "key": "Cross-Origin-Embedder-Policy", "value": "require-corp" },
|
||||
{ "key": "Cross-Origin-Opener-Policy", "value": "same-origin" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -147,7 +147,10 @@ function OpenIdConnectRoutes({ oidc, routerBasename, userAuthenticationService }
|
||||
const location = useLocation();
|
||||
const { pathname, search } = location;
|
||||
|
||||
const redirect_uri = new URL(userManager.settings._redirect_uri).pathname; //.replace(routerBasename,'')
|
||||
const redirect_uri = new URL(userManager.settings._redirect_uri).pathname.replace(
|
||||
routerBasename !== '/' ? routerBasename : '',
|
||||
''
|
||||
);
|
||||
const silent_refresh_uri = new URL(userManager.settings._silent_redirect_uri).pathname; //.replace(routerBasename,'')
|
||||
const post_logout_redirect_uri = new URL(userManager.settings._post_logout_redirect_uri).pathname; //.replace(routerBasename,'');
|
||||
|
||||
@@ -158,7 +161,7 @@ function OpenIdConnectRoutes({ oidc, routerBasename, userAuthenticationService }
|
||||
}
|
||||
|
||||
return (
|
||||
<Routes basename={routerBasename}>
|
||||
<Routes>
|
||||
<Route
|
||||
path={silent_refresh_uri}
|
||||
onEnter={window.location.reload}
|
||||
|
||||
Reference in new issue
Block a user