You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observe the console error regarding the CORS policy.
[REQUIRED] Expected Behavior
The image should load correctly without any CORS-related errors.
[REQUIRED] Actual Behavior
The request to Firebase Storage fails with the following error in the browser console:
Access to image at 'https://firebasestorage.googleapis.com/v0/b/tech4good-causeway.appspot.com/o/profile-images%2F1742934426211_Screenshot%20from%202025-03-08%2002-04-14.png?alt=media&token=xxxxx' from origin 'https://causeway.web.app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Hey @MAVRICK-1, it looks like the Cross-Origin-Embedder-Policy: require-corp setting in hosting.headers is blocking the request from Firebase Storage since it's from a different origin https://firebasestorage.googleapis.com/. Would you be able to try removing this header to see if the request would go through? The updated firebase.json would look like:
Bug Report
[REQUIRED] Environment Info
firebase-tools: (Provide the output of
firebase --version
)Platform: (e.g., macOS, Windows, Ubuntu)
[REQUIRED] Test Case
Access to an image in Firebase Storage is blocked due to a missing
Access-Control-Allow-Origin
header in CORS policy.[REQUIRED] Steps to Reproduce
Host the application on Firebase at
https://causeway.web.app
.Attempt to access an image stored in Firebase Storage using the following URL:
Observe the console error regarding the CORS policy.
[REQUIRED] Expected Behavior
The image should load correctly without any CORS-related errors.
[REQUIRED] Actual Behavior
The request to Firebase Storage fails with the following error in the browser console:
Additional Information
firebase.json configuration:
The text was updated successfully, but these errors were encountered: