EdyTheCow / docker-pterodactyl

Running Pterodactyl Panel inside docker containers behind Traefik reverse proxy
255 stars 52 forks source link

Blocked by CORS Policy #5

Closed TekExplorer closed 4 years ago

TekExplorer commented 4 years ago

87237092-c042e200-c3bf-11ea-8450-486901ff4fb1

the person im helping got this. what needs to be changed to fix this?

i somehow got it working on my system, so if you want to see my toml ill give it. its kinda over-complicated though

edited to remove domain deleted edits to erase domain further

EdyTheCow commented 4 years ago

https://github.com/EdyTheCow/pterodactyl-docker/blob/master/compose/docker-compose.yml#L66 This and below labels solve the issue.

TekExplorer commented 4 years ago

its in there: HASTEBIN

TekExplorer commented 4 years ago

i believe i fixed it by using accessControlAllowOriginList instead of accessControlAllowOrigin not sure why, but it fixed mine when i was troubleshooting before (hurts my brain remembering it)

and i have https:// appended to my domain in it

talking about my setup here

many edits for clarification and formatting

EdyTheCow commented 4 years ago

I've used current setup multiple times now when installing the panel and I didn't face the issue you described above.

TekExplorer commented 4 years ago

Odd, I will have him check other things first before testing my solution... Hopefully we just missed something :)

TekExplorer commented 4 years ago

Forgot to mention, turning on cloudflare proxy fixed it for him.

Likqez commented 1 year ago

Solved the issue with the help of this project found in this issue.

./game-servers/wings/data/wings/etc/config.yml : This file is a little weird, when you get the Panel up and running and create the location then the node, it generates a config for you which you're intended to paste into this file, when you first start panel (if everything works) it will fill in the rest of the file for you. That being said there was a few thigns I had to manually configure to get everything working. At the bottom there is these two settings allowed_origins:

After I pasted the configuration from the panel, and added

 allowed_origins:
- https://dev-panel.pluginstube.dev
allow_cors_private_network: true

and restarted wings. It all worked.