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

CORS issue #7

Open
rockoo opened this issue Jan 7, 2021 · 1 comment
Open

CORS issue #7

rockoo opened this issue Jan 7, 2021 · 1 comment

Comments

@rockoo
Copy link

rockoo commented Jan 7, 2021

Hi. I can't get the tools to work properly. I can access the UI with no problem on port 4000 but every request to emulators fails with CORS preflight not passing.

This is my config

{
  "emulators": {
    "auth": {
      "port": 9099
    },
    "firestore": {
      "port": 8080
    },
    "ui": {
      "enabled": true,
      "host": "0.0.0.0",
      "port": 4000
    }
  }
}

I have tried adding host to each of the emulators as well but nothing helps. Any ideas?
cors issue

@apata
Copy link

apata commented Jan 19, 2021

Actually I had a similar problem, and I solved it by adding "host": "0.0.0.0" to each of the emulators I was using. Now, when opening localhost:4000 on Docker host machine, it is able to find and access the firestore emulator and function logs.

My config:

  "emulators": {
    "functions": {
      "host": "0.0.0.0",
      "port": 5001
    },
    "logging": {
      "host": "0.0.0.0",
      "port": 4500
    },
    "firestore": { 
      "host": "0.0.0.0",
      "port": 8080
    },
    "hosting": {
      "port": 5000
    },
    "pubsub": {
      "port": 8085
    },
    "ui": {
      "enabled": true,
      "host": "0.0.0.0",
      "port": 4000
    }
  }

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

No branches or pull requests

2 participants