eliom
eliom copied to clipboard
api.conf port (alias bind alias listen to interface)
Hi,
I asked myself this question: Can I bind ocsigen only to 127.0.0.1 somehow ? (instead of * (so all devices))
And yes you can:
<ocsigen>
<server>
<port>127.0.0.1:8080</port>
It was the "port" that threw me off. I think "bind" or "listen" would be better (more intuitive) tag names, to reflect the fact that you can provide a port and/or ip+port.
Also the access to the configuration seems out of sync with that:
https://ocsigen.org/eliom/5.0/api/server/Eliom_config
because the get_default_port returns only a int
instead of a tuple (string option * int)
.