Skip to content

Issue using web UI on deployed scancode.io docker container #489

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
JonoYang opened this issue Aug 5, 2022 · 4 comments
Closed

Issue using web UI on deployed scancode.io docker container #489

JonoYang opened this issue Aug 5, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@JonoYang
Copy link
Member

JonoYang commented Aug 5, 2022

I've deployed scancode.io on a server using docker and I am accessing it through an ssh tunnel.

I am trying to create a project by setting a project name, uploading a file, and choosing a pipeline, but when I hit the create button, I am stuck at this screen
image

When I check the logs for the scancodeio_web container, there is a message

WARNING Forbidden (Origin checking failed - http://127.0.0.1:8001 does not match any trusted origins.): /project/add/

When I try to create an empty project, I get this message.
image

@JonoYang JonoYang added the bug Something isn't working label Aug 5, 2022
@tdruez
Copy link
Contributor

tdruez commented Aug 8, 2022

We recently added support for the CSRF_TRUSTED_ORIGINS Django setting at https://github.com/nexB/scancode.io/blob/main/scancodeio/settings.py#L47

https://docs.djangoproject.com/en/4.0/ref/settings/#std-setting-CSRF_TRUSTED_ORIGINS

@JonoYang Could you try to set CSRF_TRUSTED_ORIGINS=http://127.0.0.1:8001 in your docker.env config file?

Let me know if that solve your issue and we'll add this to the documentation.

@JonoYang
Copy link
Member Author

JonoYang commented Aug 8, 2022

@tdruez Thanks, I've added CSRF_TRUSTED_ORIGINS=http://127.0.0.1:8001,http://localhost:8001 to docker.env and it fixed the issue!

@tdruez
Copy link
Contributor

tdruez commented Aug 9, 2022

Ok great. Let's keep this one open until we add some notes to the documentation.

tdruez added a commit that referenced this issue Aug 18, 2022
@tdruez
Copy link
Contributor

tdruez commented Aug 18, 2022

Added in the docs.

@tdruez tdruez closed this as completed Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants