Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apps/client/public/firebase-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const firebaseConfig = {
apiKey: 'AIzaSyD3KM0IQ4Ro3Dd2fyAY8fnhE1bQ_NesrBc',
authDomain: 'pinback-c55de.firebaseapp.com',
projectId: 'pinback-c55de',
storageBucket: 'pinback-c55de.firebasestorage.app',
messagingSenderId: '370851215931',
appId: '1:370851215931:web:08382b5e57808d29dcba1e',
measurementId: 'G-847ZNSCC3J',
};
23 changes: 18 additions & 5 deletions apps/client/public/firebase-messaging-sw.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
/* eslint-env serviceworker */
/* eslint-disable no-undef */

const firebaseConfig = {
apiKey: 'AIzaSyD3KM0IQ4Ro3Dd2fyAY8fnhE1bQ_NesrBc',
authDomain: 'pinback-c55de.firebaseapp.com',
projectId: 'pinback-c55de',
storageBucket: 'pinback-c55de.firebasestorage.app',
messagingSenderId: '370851215931',
appId: '1:370851215931:web:08382b5e57808d29dcba1e',
measurementId: 'G-847ZNSCC3J',
};
Comment on lines +4 to +12
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ› ๏ธ Refactor suggestion | ๐ŸŸ  Major

firebaseConfig ์ค‘๋ณต ์ œ๊ฑฐ ํ•„์š”

firebase-config.js์— ์ด๋ฏธ ์ •์˜๋œ ์„ค์ •์„ ์„œ๋น„์Šค ์›Œ์ปค์—์„œ ๋‹ค์‹œ ์ •์˜ํ•˜๊ณ  ์žˆ์–ด DRY ์›์น™์„ ์œ„๋ฐ˜ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ–ฅํ›„ ์„ค์ • ๋ณ€๊ฒฝ ์‹œ ๋‘ ๊ณณ์„ ๋ชจ๋‘ ์ˆ˜์ •ํ•ด์•ผ ํ•˜๋Š” ์œ ์ง€๋ณด์ˆ˜ ๋ถ€๋‹ด์ด ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ diff๋ฅผ ์ ์šฉํ•˜์—ฌ ์ค‘๋ณต์„ ์ œ๊ฑฐํ•˜์„ธ์š”:

-const firebaseConfig = {
-  apiKey: 'AIzaSyD3KM0IQ4Ro3Dd2fyAY8fnhE1bQ_NesrBc',
-  authDomain: 'pinback-c55de.firebaseapp.com',
-  projectId: 'pinback-c55de',
-  storageBucket: 'pinback-c55de.firebasestorage.app',
-  messagingSenderId: '370851215931',
-  appId: '1:370851215931:web:08382b5e57808d29dcba1e',
-  measurementId: 'G-847ZNSCC3J',
-};
-
+importScripts('/firebase-config.js');
+
 importScripts(
๐Ÿ“ Committable suggestion

โ€ผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const firebaseConfig = {
apiKey: 'AIzaSyD3KM0IQ4Ro3Dd2fyAY8fnhE1bQ_NesrBc',
authDomain: 'pinback-c55de.firebaseapp.com',
projectId: 'pinback-c55de',
storageBucket: 'pinback-c55de.firebasestorage.app',
messagingSenderId: '370851215931',
appId: '1:370851215931:web:08382b5e57808d29dcba1e',
measurementId: 'G-847ZNSCC3J',
};
// Remove the inlined firebaseConfig and instead load it from firebase-config.js
importScripts('/firebase-config.js');
importScripts(
'https://www.gstatic.com/firebasejs/9.22.2/firebase-app-compat.js',
'https://www.gstatic.com/firebasejs/9.22.2/firebase-messaging-compat.js'
);
๐Ÿค– Prompt for AI Agents
In apps/client/public/firebase-messaging-sw.js around lines 4 to 12, remove the
hardcoded firebaseConfig object and instead load the shared configuration from
the existing firebase-config.js; do this by importing the shared file (use
importScripts('/firebase-config.js') if this SW is non-module or an ES module
import if your SW is module-type) and then use the exported/global
firebaseConfig value; ensure firebase-config.js is available in the public/build
output at the correct path so the service worker can load it at runtime.


importScripts(
'https://www.gstatic.com/firebasejs/9.22.2/firebase-app-compat.js'
);
importScripts(
'./firebase_sdk/firebase-app-compat.js',
'./firebase_sdk/firebase-messaging-compat.js',
'./firebase-config.js'
'https://www.gstatic.com/firebasejs/9.22.2/firebase-messaging-compat.js'
);
Comment on lines +14 to 19
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

โš ๏ธ Potential issue | ๐Ÿ”ด Critical

๐Ÿงฉ Analysis chain

Firebase SDK ๋ฒ„์ „ ๊ฒ€์ฆ ํ•„์š”

Firebase SDK ๋ฒ„์ „ 9.22.2๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ตœ์‹  ๋ฒ„์ „ ๋ฐ ๋ณด์•ˆ ๊ถŒ๊ณ ์‚ฌํ•ญ์„ ํ™•์ธํ•˜์—ฌ ์—…๋ฐ์ดํŠธ๊ฐ€ ํ•„์š”ํ•œ์ง€ ๊ฒ€ํ† ํ•ด์ฃผ์„ธ์š”.


๐ŸŒ Web query:

Firebase JavaScript SDK 9.22.2 security vulnerabilities and latest version

๐Ÿ’ก Result:

Short answer

  • Yes โ€” Firebase JavaScript SDK v9.22.2 is affected by a known vulnerability (CVE-2024-11023) that affects all Firebase JS SDK versions older than 10.9.0; upgrade is recommended. [1][2]
  • Latest Firebase JavaScript SDK (stable) as of Sep 30, 2025: v12.3.0 (release notes). [3]

Details & action

  • Vulnerability: CVE-2024-11023 โ€” manipulation of the FIREBASE_DEFAULTS cookie (the _authTokenSyncURL field) can allow an attacker to capture session data. Vendor guidance: upgrade to >= 10.9.0. [1][2][4]
  • If you are on 9.22.2, update to the current stable release (at minimum >=10.9.0; preferably the latest v12.3.0) and retest. See Firebase release notes for the exact release change log and install instructions. [3][1]

Sources
[1] CVE-2024-11023 advisory / public vulnerability summaries.
[2] Aggregated vulnerability databases summarizing CVE-2024-11023 (references include Firebase PR #8056).
[3] Firebase JavaScript SDK release notes (shows v12.3.0 as latest).
[4] Firebase release notes entry for v10.9.0 (patch for the issue).

Would you like the exact npm install/upgrade command and a short checklist to verify the fix in your app?


Firebase SDK๋ฅผ ์ตœ์†Œ v10.9.0(๊ถŒ์žฅ v12.3.0) ์ด์ƒ์œผ๋กœ ๊ธด๊ธ‰ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜์„ธ์š”

ํ˜„์žฌ apps/client/public/firebase-messaging-sw.js์˜ importScripts์—์„œ ์‚ฌ์šฉ ์ค‘์ธ v9.22.2(compat)๋Š” CVE-2024-11023 ์ทจ์•ฝ์ ์— ๋…ธ์ถœ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ณ€๊ฒฝํ•˜์„ธ์š”:

- importScripts('https://www.gstatic.com/firebasejs/9.22.2/firebase-app-compat.js');
- importScripts('https://www.gstatic.com/firebasejs/9.22.2/firebase-messaging-compat.js');
+ importScripts('https://www.gstatic.com/firebasejs/12.3.0/firebase-app-compat.js');
+ importScripts('https://www.gstatic.com/firebasejs/12.3.0/firebase-messaging-compat.js');

(์„ ํƒ) npm ์‚ฌ์šฉ ์‹œ:

npm install firebase@^12.3.0

๊ฒ€์ฆ ์ฒดํฌ๋ฆฌ์ŠคํŠธ:

  • importScripts URL์ด v12.3.0 ์ด์ƒ์œผ๋กœ ๋ณ€๊ฒฝ๋˜์—ˆ๋Š”์ง€ ํ™•์ธ
  • ์„œ๋น„์Šค ์›Œ์ปค ์บ์‹œ ์‚ญ์ œ ํ›„ Firebase ์ดˆ๊ธฐํ™” ๋ฐ ํ‘ธ์‹œ ์•Œ๋ฆผ ๊ธฐ๋Šฅ ์ •์ƒ ๋™์ž‘ ๊ฒ€์ฆ
  • ๋ธŒ๋ผ์šฐ์ € ํ˜ธํ™˜์„ฑ ๋ฐ ๊ธฐ์กด ๊ธฐ๋Šฅ ํšŒ๊ท€ ํ…Œ์ŠคํŠธ


self.addEventListener('install', function () {
Expand All @@ -16,14 +27,16 @@ self.addEventListener('activate', function () {
});

firebase.initializeApp(firebaseConfig);

const messaging = firebase.messaging();

messaging.onBackgroundMessage((payload) => {
console.log('Received background message ', payload);

const notificationTitle = payload.notification?.title ?? '์•Œ๋ฆผ์ด ๋„์ฐฉํ–ˆ์–ด์š”!';
const notificationTitle = payload.notification?.title ?? 'PINBACK';
const notificationOptions = {
body: payload.notification?.body,
body: payload.data?.body ?? '์•Œ๋ฆผ์ด ๋„์ฐฉํ–ˆ์–ด์š”!',
icon: payload.data?.icon ?? '/link_Thumbnail.png',
Comment on lines +36 to +39
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

โš ๏ธ Potential issue | ๐ŸŸ  Major

์•Œ๋ฆผ ํŽ˜์ด๋กœ๋“œ ์ฒ˜๋ฆฌ ๋ถˆ์ผ์น˜

์ œ๋ชฉ์€ payload.notification?.title์—์„œ ์ฝ์ง€๋งŒ, ๋ณธ๋ฌธ๊ณผ ์•„์ด์ฝ˜์€ payload.data?.body์™€ payload.data?.icon์—์„œ ์ฝ๊ณ  ์žˆ์–ด ์ผ๊ด€์„ฑ์ด ์—†์Šต๋‹ˆ๋‹ค.

FCM ๋ฉ”์‹œ์ง€ ์œ ํ˜•์— ๋”ฐ๋ผ:

  • Notification ๋ฉ”์‹œ์ง€: ์ œ๋ชฉ๋งŒ ํ‘œ์‹œ๋˜๊ณ  ๋ณธ๋ฌธ/์•„์ด์ฝ˜์€ ๊ธฐ๋ณธ๊ฐ’์œผ๋กœ ๋Œ€์ฒด๋ฉ๋‹ˆ๋‹ค
  • Data ๋ฉ”์‹œ์ง€: ๋ณธ๋ฌธ/์•„์ด์ฝ˜๋งŒ ํ‘œ์‹œ๋˜๊ณ  ์ œ๋ชฉ์€ 'PINBACK'์œผ๋กœ ๋Œ€์ฒด๋ฉ๋‹ˆ๋‹ค

๋ชจ๋“  ํ•„๋“œ๋ฅผ ๋™์ผํ•œ ์†Œ์Šค์—์„œ ์ฝ๋„๋ก ํ†ต์ผํ•˜์„ธ์š”:

์˜ต์…˜ 1: data ํŽ˜์ด๋กœ๋“œ ์šฐ์„  (data ๋ฉ”์‹œ์ง€ ์ง€์› ์‹œ)

-  const notificationTitle = payload.notification?.title ?? 'PINBACK';
+  const notificationTitle = payload.data?.title ?? payload.notification?.title ?? 'PINBACK';
   const notificationOptions = {
     body: payload.data?.body ?? '์•Œ๋ฆผ์ด ๋„์ฐฉํ–ˆ์–ด์š”!',
     icon: payload.data?.icon ?? '/link_Thumbnail.png',
   };

์˜ต์…˜ 2: notification ํŽ˜์ด๋กœ๋“œ ์šฐ์„  (notification ๋ฉ”์‹œ์ง€ ์ง€์› ์‹œ)

-  const notificationTitle = payload.notification?.title ?? 'PINBACK';
+  const notificationTitle = payload.notification?.title ?? payload.data?.title ?? 'PINBACK';
   const notificationOptions = {
-    body: payload.data?.body ?? '์•Œ๋ฆผ์ด ๋„์ฐฉํ–ˆ์–ด์š”!',
-    icon: payload.data?.icon ?? '/link_Thumbnail.png',
+    body: payload.notification?.body ?? payload.data?.body ?? '์•Œ๋ฆผ์ด ๋„์ฐฉํ–ˆ์–ด์š”!',
+    icon: payload.notification?.icon ?? payload.data?.icon ?? '/link_Thumbnail.png',
   };
๐Ÿ“ Committable suggestion

โ€ผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const notificationTitle = payload.notification?.title ?? 'PINBACK';
const notificationOptions = {
body: payload.notification?.body,
body: payload.data?.body ?? '์•Œ๋ฆผ์ด ๋„์ฐฉํ–ˆ์–ด์š”!',
icon: payload.data?.icon ?? '/link_Thumbnail.png',
const notificationTitle = payload.notification?.title ?? payload.data?.title ?? 'PINBACK';
const notificationOptions = {
body: payload.notification?.body ?? payload.data?.body ?? '์•Œ๋ฆผ์ด ๋„์ฐฉํ–ˆ์–ด์š”!',
icon: payload.notification?.icon ?? payload.data?.icon ?? '/link_Thumbnail.png',
};
๐Ÿค– Prompt for AI Agents
In apps/client/public/firebase-messaging-sw.js around lines 36 to 39, the code
reads title from payload.notification but body/icon from payload.data, causing
inconsistent behavior for Notification vs Data messages; unify the source by
choosing a single precedence strategy (e.g., data-first): read title, body, and
icon from payload.data when present, otherwise fall back to
payload.notification, and update notificationTitle and notificationOptions to
use that unified lookup so all fields come from the same payload source.

};
self.registration.showNotification(notificationTitle, notificationOptions);
});
19 changes: 8 additions & 11 deletions apps/client/src/pages/onBoarding/components/funnel/MainCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ const MainCard = () => {
}
}, [location.search]);



// FCM ๊ตฌ๊ฐ„
const [fcmToken, setFcmToken] = useState<string | null>(null);
const app = initializeApp(firebaseConfig);
Expand Down Expand Up @@ -131,24 +129,23 @@ const MainCard = () => {
const [remindTime, setRemindTime] = useState('09:00');
const nextStep = async () => {
if (step === 3) {
if (alarmSelected==1){
if (alarmSelected == 1) {
setRemindTime('09:00');
} else if (alarmSelected==2){
} else if (alarmSelected == 2) {
setRemindTime('20:00');
} else{
} else {
const raw = AlarmsType[alarmSelected - 1].time;
setRemindTime(normalizeTime(raw))
setRemindTime(normalizeTime(raw));
}
Comment on lines +132 to 139
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ› ๏ธ Refactor suggestion | ๐ŸŸ  Major

๋А์Šจํ•œ ๋™๋“ฑ ์—ฐ์‚ฐ์ž ๋Œ€์‹  ์—„๊ฒฉํ•œ ๋™๋“ฑ ์—ฐ์‚ฐ์ž๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”.

== ๋Œ€์‹  ===๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด TypeScript/JavaScript ๋ชจ๋ฒ” ์‚ฌ๋ก€์ž…๋‹ˆ๋‹ค. alarmSelected๋Š” 1 | 2 | 3 ํƒ€์ž…์ด๋ฏ€๋กœ ํƒ€์ž… ๊ฐ•์ œ ๋ณ€ํ™˜์ด ๋ฐœ์ƒํ•˜์ง€ ์•Š์ง€๋งŒ, ์ผ๊ด€์„ฑ๊ณผ ๋ช…ํ™•์„ฑ์„ ์œ„ํ•ด ์—„๊ฒฉํ•œ ๋น„๊ต๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ diff๋ฅผ ์ ์šฉํ•˜์—ฌ ์—„๊ฒฉํ•œ ๋™๋“ฑ ์—ฐ์‚ฐ์ž๋กœ ๋ณ€๊ฒฝํ•˜์„ธ์š”:

-      if (alarmSelected == 1) {
+      if (alarmSelected === 1) {
         setRemindTime('09:00');
-      } else if (alarmSelected == 2) {
+      } else if (alarmSelected === 2) {
         setRemindTime('20:00');
       } else {
๐Ÿ“ Committable suggestion

โ€ผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (alarmSelected == 1) {
setRemindTime('09:00');
} else if (alarmSelected==2){
} else if (alarmSelected == 2) {
setRemindTime('20:00');
} else{
} else {
const raw = AlarmsType[alarmSelected - 1].time;
setRemindTime(normalizeTime(raw))
setRemindTime(normalizeTime(raw));
}
if (alarmSelected === 1) {
setRemindTime('09:00');
} else if (alarmSelected === 2) {
setRemindTime('20:00');
} else {
const raw = AlarmsType[alarmSelected - 1].time;
setRemindTime(normalizeTime(raw));
}
๐Ÿค– Prompt for AI Agents
In apps/client/src/pages/onBoarding/components/funnel/MainCard.tsx around lines
132 to 139, the code uses loose equality (==) to compare alarmSelected to
numeric literals; update both comparisons to strict equality (===) so the checks
read alarmSelected === 1 and alarmSelected === 2 to follow TypeScript/JavaScript
best practices and ensure consistent, type-safe comparisons.



setDirection(1);
setStep((prev) => prev + 1);
return;
}
if ((isMac && step <5) || (!isMac && step <4)) {
if ((isMac && step < 5) || (!isMac && step < 4)) {
setDirection(1);
setStep((prev) => prev + 1);
} else if ( (isMac && step === 5) || (!isMac && step==4)) {
} else if ((isMac && step === 5) || (!isMac && step == 4)) {
Comment on lines +145 to +148
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ› ๏ธ Refactor suggestion | ๐ŸŸ  Major

๋А์Šจํ•œ ๋™๋“ฑ ์—ฐ์‚ฐ์ž ๋Œ€์‹  ์—„๊ฒฉํ•œ ๋™๋“ฑ ์—ฐ์‚ฐ์ž๋ฅผ ์‚ฌ์šฉํ•˜์„ธ์š”.

Line 148์—์„œ step == 4 ๋Œ€์‹  step === 4๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ diff๋ฅผ ์ ์šฉํ•˜์„ธ์š”:

-    } else if ((isMac && step === 5) || (!isMac && step == 4)) {
+    } else if ((isMac && step === 5) || (!isMac && step === 4)) {
๐Ÿ“ Committable suggestion

โ€ผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if ((isMac && step < 5) || (!isMac && step < 4)) {
setDirection(1);
setStep((prev) => prev + 1);
} else if ( (isMac && step === 5) || (!isMac && step==4)) {
} else if ((isMac && step === 5) || (!isMac && step == 4)) {
if ((isMac && step < 5) || (!isMac && step < 4)) {
setDirection(1);
setStep((prev) => prev + 1);
} else if ((isMac && step === 5) || (!isMac && step === 4)) {
๐Ÿค– Prompt for AI Agents
In apps/client/src/pages/onBoarding/components/funnel/MainCard.tsx around lines
145 to 148, the code uses a loose equality operator (`==`) in the condition
`step == 4`; change it to the strict equality operator (`===`) so the condition
reads `step === 4`. Ensure the comparison type matches (no implicit coercion
expected) and keep the surrounding logic unchanged.

postSignData(
{
email: userEmail,
Expand All @@ -164,7 +161,7 @@ const MainCard = () => {
if (savedEmail) {
window.location.href = '/';
}
}
},
}
);
}
Expand Down Expand Up @@ -205,7 +202,7 @@ const MainCard = () => {
</div>

<div className="mb-[4.8rem] mt-[1.2rem] flex w-full justify-between px-[3.2rem]">
{step < 4 && step > 0 && (
{step < 4 && step > 0 && (
<Button
variant="secondary"
size="medium"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const registerServiceWorker = () => {
navigator.serviceWorker
.register('firebase-messaging-sw.js')
.register('/firebase-messaging-sw.js')
.then(function (registration) {
console.log(`Service Worker ๋“ฑ๋ก ์„ฑ๊ณต:, ${registration}`);
})
Expand Down
6 changes: 2 additions & 4 deletions apps/client/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
"source": "/firebase-messaging-sw.js",
"destination": "/firebase-messaging-sw.js"
},
{
"source": "/(.*)",
"destination": "/index.html"
}
{ "source": "/firebase_sdk/(.*)", "destination": "/firebase_sdk/$1" },
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

โš ๏ธ Potential issue | ๐Ÿ”ด Critical

๐Ÿงฉ Analysis chain

Firebase SDK ๊ฒฝ๋กœ์— ๋Œ€ํ•œ ์‹ค์ œ ์ž์‚ฐ์„ ํ™•์ธํ•˜์„ธ์š”.

/firebase_sdk/* ๊ฒฝ๋กœ์— ๋Œ€ํ•œ ์ƒˆ๋กœ์šด ๋ฆฌ๋ผ์ดํŠธ ๊ทœ์น™์ด ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด ๊ฒฝ๋กœ๊ฐ€ CDN ๊ธฐ๋ฐ˜ Firebase SDK ๋กœ๋”ฉ์„ ์ง€์›ํ•˜๊ธฐ ์œ„ํ•œ ๊ฒƒ์œผ๋กœ ๋ณด์ด์ง€๋งŒ, ์‹ค์ œ๋กœ /firebase_sdk ๋””๋ ‰ํ† ๋ฆฌ๋‚˜ ํ•ด๋‹น ์ž์‚ฐ์ด ์กด์žฌํ•˜๋Š”์ง€ ํ™•์ธ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‹คํ–‰ํ•˜์—ฌ Firebase SDK ์ž์‚ฐ ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ํ™•์ธํ•˜์„ธ์š”:


๐Ÿ Script executed:

#!/bin/bash
# Description: Firebase SDK ์ž์‚ฐ ๋””๋ ‰ํ† ๋ฆฌ ๋ฐ ํŒŒ์ผ ํ™•์ธ

# public ๋””๋ ‰ํ† ๋ฆฌ ๋‚ด firebase_sdk ํด๋” ๊ฒ€์ƒ‰
fd -t d "firebase_sdk" apps/client/public

# Firebase SDK ๊ด€๋ จ ํŒŒ์ผ ๊ฒ€์ƒ‰
fd -e js "firebase.*sdk|firebase.*app|firebase.*messaging" apps/client/public

Length of output: 43


/firebase_sdk ๋””๋ ‰ํ† ๋ฆฌ ์กด์žฌ ์—ฌ๋ถ€ ํ™•์ธ ํ•„์š”

apps/client/vercel.json์— ์ถ”๊ฐ€๋œ

{ "source": "/firebase_sdk/(.*)", "destination": "/firebase_sdk/$1" },

rewrite ๊ทœ์น™์ด ๊ฐ€๋ฆฌํ‚ค๋Š” apps/client/public/firebase_sdk ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ ์กด์žฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. (fd ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ: apps/client/public/firebase-messaging-sw.js๋งŒ ํ™•์ธ๋จ)
ํ•ด๋‹น ๋””๋ ‰ํ† ๋ฆฌ ๋ฐ ํ•„์š”ํ•œ SDK ์ž์‚ฐ์„ ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜, ๋ถˆํ•„์š”ํ•œ ๊ฒฝ์šฐ rewrite ๊ทœ์น™์„ ์ œ๊ฑฐํ•˜์„ธ์š”.

๐Ÿค– Prompt for AI Agents
In apps/client/vercel.json around line 7, the rewrite rule routing
"/firebase_sdk/(.*)" to "/firebase_sdk/$1" points to a non-existent directory
(apps/client/public/firebase_sdk); either create that directory and add the
required Firebase SDK assets (copy the SDK files into
apps/client/public/firebase_sdk and ensure they are committed), or remove the
rewrite entry from vercel.json if those assets are not needed; after changing,
run a local file-listing or build to verify the path exists and that the rewrite
no longer references a missing target.

{ "source": "/(.*)", "destination": "/index.html" }
]
}
13 changes: 11 additions & 2 deletions apps/extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@
"version": "0.1.0",
"action": { "default_popup": "popup.html" },
"icons": {
"128": "icon.png"
"128": "icon.png",
"256": "icon.png",
"512": "icon.png"
},
"permissions": ["activeTab", "tabs", "storage", "bookmarks", "identity","identity.email"],
"permissions": [
"activeTab",
"tabs",
"storage",
"bookmarks",
"identity",
"identity.email"
],
"background": {
"service_worker": "src/background.js",
"type": "module"
Expand Down
Binary file modified apps/extension/public/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading