Skip to content

Commit cfac5ed

Browse files
authored
[Fixes #19852] Remove leading slash on authorization links (#20026)
* Makes the Uris base relative instead host relative.
1 parent 38a4f20 commit cfac5ed

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/src/api-authorization/api-authorization.constants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const LoginActions = {
2323

2424
let applicationPaths: ApplicationPathsType = {
2525
DefaultLoginRedirectPath: '/',
26-
ApiAuthorizationClientConfigurationUrl: `/_configuration/${ApplicationName}`,
26+
ApiAuthorizationClientConfigurationUrl: `_configuration/${ApplicationName}`,
2727
Login: `authentication/${LoginActions.Login}`,
2828
LoginFailed: `authentication/${LoginActions.LoginFailed}`,
2929
LoginCallback: `authentication/${LoginActions.LoginCallback}`,
@@ -40,8 +40,8 @@ let applicationPaths: ApplicationPathsType = {
4040
LogOutPathComponents: [],
4141
LoggedOutPathComponents: [],
4242
LogOutCallbackPathComponents: [],
43-
IdentityRegisterPath: '/Identity/Account/Register',
44-
IdentityManagePath: '/Identity/Account/Manage'
43+
IdentityRegisterPath: 'Identity/Account/Register',
44+
IdentityManagePath: 'Identity/Account/Manage'
4545
};
4646

4747
applicationPaths = {

src/ProjectTemplates/Web.Spa.ProjectTemplates/content/React-CSharp/ClientApp/src/components/api-authorization/ApiAuthorizationConstants.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const prefix = '/authentication';
2323

2424
export const ApplicationPaths = {
2525
DefaultLoginRedirectPath: '/',
26-
ApiAuthorizationClientConfigurationUrl: `/_configuration/${ApplicationName}`,
26+
ApiAuthorizationClientConfigurationUrl: `_configuration/${ApplicationName}`,
2727
ApiAuthorizationPrefix: prefix,
2828
Login: `${prefix}/${LoginActions.Login}`,
2929
LoginFailed: `${prefix}/${LoginActions.LoginFailed}`,
@@ -33,6 +33,6 @@ export const ApplicationPaths = {
3333
LogOut: `${prefix}/${LogoutActions.Logout}`,
3434
LoggedOut: `${prefix}/${LogoutActions.LoggedOut}`,
3535
LogOutCallback: `${prefix}/${LogoutActions.LogoutCallback}`,
36-
IdentityRegisterPath: '/Identity/Account/Register',
37-
IdentityManagePath: '/Identity/Account/Manage'
36+
IdentityRegisterPath: 'Identity/Account/Register',
37+
IdentityManagePath: 'Identity/Account/Manage'
3838
};

0 commit comments

Comments
 (0)