Skip to content

Commit fee274f

Browse files
authored
fix: header api url (#1631)
1 parent 5e6de33 commit fee274f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/hooks/useLoadUser.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ export default function useLoadUser() {
8585
// 3a. Handle get user success
8686
useEffect(() => {
8787
if (userResourceIsSuccess) {
88-
console.log('User resource loaded:', userResource);
8988
if (!userResource.user?.id) {
9089
setIsInvalidUserResourceResponse(true);
9190
return;

scriptUrls.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
const API_URL = URL(process.env.NEXT_PUBLIC_API_URL).hostname;
2+
13
const scriptSrcUrls = [
2-
process.env.NEXT_PUBLIC_API_URL,
4+
API_URL,
35
'https://*.google-analytics.com',
46
'https://identitytoolkit.googleapis.com',
57
'https://*.hotjar.com',
@@ -53,6 +55,7 @@ const imgSrcUrls = [
5355
'https://i.ytimg.com',
5456
];
5557
const connectSrcUrls = [
58+
API_URL,
5659
'https://*.hotjar.com',
5760
'wss://ws.hotjar.com',
5861
'https://*.googletagmanager.com',
@@ -70,8 +73,7 @@ const connectSrcUrls = [
7073
'https://noembed.com',
7174
'https://*.youtube.com',
7275
'https://www.youtube.com',
73-
...(process.env.NODE_ENV === 'development' ? ['http://localhost:35001'] : []),
74-
process.env.NEXT_PUBLIC_API_URL,
76+
'https://vercel.live',
7577
];
7678
const frameSrcUrls = [
7779
'https://*.hotjar.com',

0 commit comments

Comments
 (0)