-
-
Notifications
You must be signed in to change notification settings - Fork 18
fix token interceptor for https #1524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -34,6 +34,9 @@ export class TokenInterceptor implements HttpInterceptor { | |||||||||||||||||||
| if (url.startsWith('http://')) { | ||||||||||||||||||||
| return url; | ||||||||||||||||||||
| } | ||||||||||||||||||||
| if (url.startsWith('https://')) { | ||||||||||||||||||||
| return url; | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
Comment on lines
34
to
+39
|
||||||||||||||||||||
| if (url.startsWith('http://')) { | |
| return url; | |
| } | |
| if (url.startsWith('https://')) { | |
| return url; | |
| } | |
| if (url.startsWith('http://') || url.startsWith('https://')) { | |
| return url; | |
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| export const environment = { | ||
| production: false, | ||
| saas: false, | ||
| apiRoot: 'https://rocketadmin-dev.tail9f8b2.ts.net/api', | ||
| saasURL: 'https://rocketadmin-dev.tail9f8b2.ts.net', | ||
| apiRoot: 'https://app.rocketadmin.com/api', | ||
| saasURL: 'https://app.rocketadmin.com', | ||
|
Comment on lines
+4
to
+5
|
||
| saasHostnames: ['localhost', '127.0.0.1'], | ||
| stagingHost: '', | ||
| version: '0.0.0', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new
https://branch changes URL normalization behavior but the existing spec only checks interceptor creation. Please add unit tests that exercisenormalizeURL()forhttp://andhttps://absolute URLs to ensure they are not prefixed withbaseURL(and to guard against regressions).