Open 2096779623 opened 11 months ago
@2096779623 could you please check if it helps to start the server with --host
option? Like cook server --host
. Thanks!
Works, but it looks a bit weird and the recipes don't display properly after adding the --host
parameter.
Thanks for checking. Yeah, that doesn't look great... It suspiciously look like a CORS issue. I'll have a look.
please note that cook server
's argument parsing is quite broken:
$ cook server
INFO Listening on 127.0.0.1:9080
^C INFO Stopping server
INFO Server stopped
$ cook server .
INFO Listening on 127.0.0.1:9080
^C INFO Stopping server
INFO Server stopped
$ cook server --host 192.168.122.10
INFO Listening on 0.0.0.0:9080
^C INFO Stopping server
INFO Server stopped
$ cook server --host 127.0.0.1
INFO Listening on 0.0.0.0:9080
^C INFO Stopping server
INFO Server stopped
$ cook server --host 127.0.0.1 .
error: unexpected argument '.' found
Usage: cook server [OPTIONS] [BASE_PATH]
For more information, try '--help'.
$
to summarize:
--host
, results in listening to 0.0.0.0
instead of 127.0.0.1
(including IPv6 addresses, or random garbage)--host
means we can't pass a BASE_PATH
This confusion is probably best demonstrated when we GNU style, reverse options and arguments:
$ cook server . --host 0.0.0.0
error: unexpected argument '0.0.0.0' found
Usage: cook server [OPTIONS] [BASE_PATH]
For more information, try '--help'.
$
It doesn't have the output like the help page.
Access on another Android device:
Chrome prompts
ERR_CONNECTION_REFUSED
.