Skip to content
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

fix: cors preflight issue in production #178

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Conversation

fforbeck
Copy link
Member

@fforbeck fforbeck commented Jan 9, 2025

Context

  • Error while creating a new space in production:

create:1 Access to fetch at 'https://w3s.link/' from origin 'https://console.storacha.network' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

Issue

  • I was using the w3s.link as the gateway host to be authorized to serve the space content, but the cors policy defined in the w3s.link doesn't allow redirects for a preflight request.
  • It doesn't happen in staging because in staging I am using the actual gateway, and not the proxy: freeway-staging.dag.haus.

Fix

  • Authorize the actual production gateway instead of the proxy: https://freeway.dag.haus.

Copy link
Contributor

github-actions bot commented Jan 9, 2025

Website preview 🔗✨

build log

@fforbeck
Copy link
Member Author

fforbeck commented Jan 9, 2025

I'll move forward and merge this to unblock Prod env. Happy to address any changes in another PR if needed.

@fforbeck fforbeck merged commit 1b1b79a into main Jan 9, 2025
5 checks passed
@fforbeck fforbeck deleted the fix/preflight-cors branch January 9, 2025 23:53
fforbeck pushed a commit that referenced this pull request Jan 9, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.17.3](w3console-v1.17.2...w3console-v1.17.3)
(2025-01-09)


### Bug Fixes

* cors preflight issue in production
([#178](#178))
([1b1b79a](1b1b79a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant