Skip to content

Error: access blocked by CORS policy #704

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

Closed
4 tasks
Viorae opened this issue Feb 20, 2022 · 3 comments
Closed
4 tasks

Error: access blocked by CORS policy #704

Viorae opened this issue Feb 20, 2022 · 3 comments
Labels
type:question Support or code-level question

Comments

@Viorae
Copy link

Viorae commented Feb 20, 2022

New Issue Checklist

Issue Description

Steps to reproduce

Actual Outcome

Expected Outcome

Environment

Parse Flutter SDK

  • SDK version: FILL_THIS_OUT
  • Operating system version: FILL_THIS_OUT

Server

  • Parse Server version: FILL_THIS_OUT

Logs

@parse-github-assistant
Copy link

parse-github-assistant bot commented Feb 20, 2022

Thanks for opening this issue!

  • ❌ Please check all required checkboxes at the top, otherwise your issue will be closed.

  • ⚠️ Remember that a security vulnerability must only be reported confidentially, see our Security Policy. If you are not sure whether the issue is a security vulnerability, the safest way is to treat it as such and submit it confidentially to us for evaluation.

@Viorae Viorae changed the title When running on Web I got a error with login: Access been blocked by CORS policy: Request header field x-parse-installation-id is not allowed by Access-Control-Allow-Headers in preflight response When running on Web I got a error with login: Access been blocked by CORS policy: Request header field x-parse-installation-id is not allowed by Access-Control-Allow-Headers in preflight response Feb 20, 2022
@RodrigoSMarques
Copy link
Contributor

This error is not package related, but your server configuration : allowHeaders.

This is described in the documentation in pub.dev

Early Web support
Currently this requires adding X-Parse-Installation-Id as an allowed header to parse-server. When running directly via docker, set the env var PARSE_SERVER_ALLOW_HEADERS=X-Parse-Installation-Id. When running via express, set [ParseServerOptions](https://parseplatform.org/parse-server/api/master/ParseServerOptions.html) allowHeaders: ['X-Parse-Installation-Id'].

Be aware that for web ParseInstallation does include app name, version or package identifier.

See issue:
#490 , #385

@mtrezza mtrezza changed the title When running on Web I got a error with login: Access been blocked by CORS policy: Request header field x-parse-installation-id is not allowed by Access-Control-Allow-Headers in preflight response Error: access blocked by CORS policy Feb 23, 2022
@mtrezza mtrezza added the type:question Support or code-level question label Feb 23, 2022
@mtrezza
Copy link
Member

mtrezza commented Feb 23, 2022

I'm closing this as it does not seem to be a Parse Flutter SDK issue.

  • For help with Parse Platform we recommend our community forum
  • For coding questions we recommend Stack Overflow using the parse-platform tag
  • For network and server questions we recommend ServerFault using the parse-server tag

Feel free to comment if you have any questions and we can re-open this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

3 participants