Skip to content

Commit 5b3e2e6

Browse files
authored
Merge pull request #59 from thughari/dev
cors for https://jobtrackerpro.in/
2 parents f4c7b0e + de784ca commit 5b3e2e6

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

backend/src/main/resources/application-prod.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ spring.security.oauth2.client.registration.google.redirect-uri={baseUrl}/login/o
3535

3636

3737
# config
38-
app.allowed.cors=https://thughari.github.io
38+
app.allowed.cors=https://jobtrackerpro.in
3939
app.allowed.methods=GET,POST,PUT,DELETE,OPTIONS
4040
app.public.endpoints=/api/auth/signup,/api/auth/login,/api/auth/refresh,/api/auth/logout,/api/auth/forgot-password,/api/auth/verify-email,/api/auth/resend-verification,/api/auth/reset-password,/oauth2/**,/api/webhooks/inbound-email,/api/webhooks/gmail/push
4141

frontend/angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
}
5454
],
5555
"outputHashing": "all",
56-
"baseHref": "/JobTrackerPro/"
56+
"baseHref": "/"
5757
},
5858
"development": {
5959
"optimization": false,

frontend/src/404.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55
<title>Redirecting...</title>
66
<link rel="icon" type="image/svg+xml" href="favicon.svg">
77
<script>
8-
const base = '/JobTrackerPro';
9-
const path = location.pathname.replace(base, '');
10-
const search = location.search;
11-
const hash = location.hash;
128

13-
location.replace(
14-
base + '/?redirect=' +
15-
encodeURIComponent(path + search + hash)
16-
);
9+
const l = window.location;
10+
const redirect = l.pathname + l.search + l.hash;
11+
12+
if (!l.search.includes('redirect=')) {
13+
l.replace('/?redirect=' + encodeURIComponent(redirect));
14+
}
1715
</script>
1816
</head>
1917
<body></body>

0 commit comments

Comments
 (0)