mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 19:05:32 -04:00
Add host to config
This commit is contained in:
parent
6fa575cf4f
commit
bf3900f9a2
@ -5,6 +5,7 @@ class Config
|
|||||||
|
|
||||||
@[YAML::Field(ignore: true)]
|
@[YAML::Field(ignore: true)]
|
||||||
property path : String = ""
|
property path : String = ""
|
||||||
|
property host : String = "0.0.0.0"
|
||||||
property port : Int32 = 9000
|
property port : Int32 = 9000
|
||||||
property base_url : String = "/"
|
property base_url : String = "/"
|
||||||
property session_secret : String = "mango-session-secret"
|
property session_secret : String = "mango-session-secret"
|
||||||
|
@ -49,9 +49,7 @@ 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 = Config.current.host
|
||||||
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user