Repository navigation
Description
Hi,
I wish to use cookcli behind a reverse proxy, I found a configuration in the Raspberry example :
server {
listen 80;
server_name recipes.local;
location / {
proxy_pass http://localhost:9080;
proxy_http_version 1.1;
proxy_set_header Host $host;
gzip on;
gzip_types text/plain application/json text/css application/javascript;
}
}
But in my case I have other services on this computer, behind a NGINX proxy, so I can't use the root folder.
I need to acces to the cook server like http://my_host.local/cook/ ( not http://my_host.local/ )
so the NGINX configuration should be :
server {
listen 80;
server_name recipes.local;
location /cook/ {
proxy_pass http://localhost:9080;
proxy_http_version 1.1;
proxy_set_header Host $host;
gzip on;
gzip_types text/plain application/json text/css application/javascript;
}
}
But I don't find how to change the base URL with the CLI, the command
cook server -h
give me this :
Usage: cook server [OPTIONS] [BASE_PATH]
Arguments:
[BASE_PATH] Root directory containing your recipe files
Options:
--host [<ADDRESS>] Allow connections from external hosts (not just localhost)
-v, --verbose... Increase verbosity (-v for info, -vv for debug, -vvv for trace)
-p, --port <PORT> Port number for the HTTP server [default: 9080]
--open Automatically open the web interface in your default browser
-h, --help Print help (see more with '--help')
no mentions of a base URL, did I miss something ?
I wish something like that :
cook server --host --port 9080 --base-url "/cook"
Activity
feat: add --url-prefix flag for reverse proxy subpath support
feat: add --url-prefix flag for reverse proxy subpath support (cookla…