Skip to content

[feature ?] base url parameter #300

Closed

Description

@aloade

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

  1. added a commit that references this issue on Apr 5, 2026
    614a441
  2. added a commit that references this issue on Apr 7, 2026
    bdf4d32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions