Eve REST Api always returns 404 when not connected via localhost
Question
I followed the Quick Start Guide and setup the /people
endpoint.
It's all working fine as long as I just ask the API via 127.0.0.1
. So when I try to connect remotely via 192.168.0.206
it's giving me a 404.
I already changed app.run()
to app.run(host='0.0.0.0')
and I've also tried app.run(host='192.168.0.206')
without success.
When running with app.run(host='0.0.0.0')
I can connect via localhost
but not via the remote Interface.
strace
-ing did not helped neither reading the documentation as well :-)
I guess it depends on the SERVER_NAME
variable, but can not figure out, what is going on there.
I tried different things there as well like 192.168.0.206:5000
, 192.168.0.206
, the hostname of the box, 0.0.0.0:5000
.
Any suggestions?
Solution
Set SERVER_NAME = None
, which is the default setting.