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

Andi Public not working in Dev and Staging #1273

Open
2 tasks
christinepoydence opened this issue Jul 20, 2021 · 0 comments
Open
2 tasks

Andi Public not working in Dev and Staging #1273

christinepoydence opened this issue Jul 20, 2021 · 0 comments

Comments

@christinepoydence
Copy link
Member

christinepoydence commented Jul 20, 2021

What

Andi Public is not working correctly in the development and staging environment.

Acceptance Criteria

  • Andi Public can be used to view a dataset in the dev environment
  • Andi Public can be used to view a dataset in the staging environment

Why

The following error message is displayed:

5:28:20.990 [error] Could not check origin for Phoenix.Socket transport. │ │ Origin of the request: https://sharedata.dev-smartos.com │ │ This happens when you are attempting a socket connection to │ │ a different host than the one configured in your config/ │ │ files. For example, in development the host is configured │ │ to "localhost" but you may be trying to access it from │ │ "127.0.0.1". To fix this issue, you may either: │ │ 1. update [url: [host: ...]] to your actual host in the │ │ config file for your current environment (recommended) │ │ 2. pass the :check_origin option when configuring your │ │ endpoint or when configuring the transport in your │ │ UserSocket module, explicitly outlining which origins │ │ are allowed: │ │ check_origin: ["https://example.com", │ │ "//another.com:888", "//other.com"]

This seems to relate to the fact that the ANDI public URL in dev is:
https://sharedata.dev-smartos.com/datasets

And the ANDI public URL in staging is:
https://sharedata.staging-smartos.com/datasets

However, in smartcitiesdata/apps/andi/config.exc, the check origin pattern matching only includes the following urls: check_origin: ["http://localhost:4000", "https://*.smartcolumbusos.com"]

Since the pattern of the dev and staging ANDI instances do not follow this pattern, the application does not work properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants