Bind localhost when a proxy auth header is set

This commit is contained in:
Alex Ling 2021-03-03 16:28:31 +00:00
parent 604c5d49a6
commit 6fa575cf4f

View File

@ -49,6 +49,9 @@ class Server
{% if flag?(:release) %} {% if flag?(:release) %}
Kemal.config.env = "production" Kemal.config.env = "production"
{% end %} {% end %}
unless Config.current.auth_proxy_header_name.empty?
Kemal.config.host_binding = "127.0.0.1"
end
Kemal.config.port = Config.current.port Kemal.config.port = Config.current.port
Kemal.run Kemal.run
end end