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

Hostname configuration for DNS domain name #7

Closed
alxlion opened this issue Aug 11, 2022 · 1 comment
Closed

Hostname configuration for DNS domain name #7

alxlion opened this issue Aug 11, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@alxlion
Copy link
Contributor

alxlion commented Aug 11, 2022

Improve documentation about domain configuration + fix error:

[error] Could not check origin for Phoenix.Socket transport.

Origin of the request: https://clapper.some.domain/

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 configuredto "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](https://other.com/)"]
@alxlion alxlion added the bug Something isn't working label Aug 11, 2022
@alxlion alxlion self-assigned this Aug 11, 2022
@railsmechanic
Copy link
Contributor

Hi @alexlionco
I think you need to set the environment variable ENDPOINT_HOST and ENDPOINT_PORT.
For me it works with ENDPOINT_HOST=claper.<your-domain.com> and ENDPOINT_PORT=<80/443>.

@alxlion alxlion closed this as completed Sep 5, 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