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

Adding info log if they have http/https set but not server: true set #5362

Merged
merged 5 commits into from
Mar 20, 2023

Conversation

jeregrine
Copy link
Member

When a user misconfigures their app to not set server: true on the endpoint with releases the app just hangs and has no reason to log anything by default.

See dwyl/phoenix-liveview-chat-example#111 (comment) this should warn them if they have HTTP/HTTPS set but not server: true.

@@ -127,6 127,11 @@ defmodule Phoenix.Endpoint.Supervisor do
adapter = config[:adapter] || Phoenix.Endpoint.Cowboy2Adapter
adapter.child_specs(mod, config)
else
if config[:http] || config[:https] do
Copy link
Member

@josevalim josevalim Mar 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably use a cond to avoid nesting.

@jeregrine
Copy link
Member Author

@josevalim <3 thanks

@chrismccord chrismccord merged commit c44ea28 into main Mar 20, 2023
@chrismccord
Copy link
Member

❤️❤️❤️🐥🔥

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

Successfully merging this pull request may close these issues.

3 participants