Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Unable to configure API_PREFIX #186

Open
mweinelt opened this issue Dec 8, 2016 · 0 comments
Open

Unable to configure API_PREFIX #186

mweinelt opened this issue Dec 8, 2016 · 0 comments

Comments

@mweinelt
Copy link

mweinelt commented Dec 8, 2016

I've tried reverse proxying the salt-api endpoint on /api as described in the the nginx tutorial, but there doesn't seem to be a way to tell saltpad to look for the salt api below that path, as API_URL does not accept an URL but a hostname/port.

TypeError: Hostname "salt.xy.z.net:443/api" contains characters other than [A-Z0-9.-]

We will need to "proxy" requests from nginx to salt-api on a specific URL, let's choose "/api", your configuration should now looks like:

    # Salt-api specific
    location /api/ {
        proxy_pass       http://localhost:8000/;
        proxy_set_header Host      $host;
        proxy_set_header X-Real-IP $remote_addr;
    }

No mention how to update settings.json accordingly.

(https://github.com/Lothiraldan/saltpad/blob/master/docs/installation/nginx-across-internet-cors.md#salt-api-configuration)

@mweinelt mweinelt changed the title Hosting the API endpoint on the same host as Saltpad Unable to configure API_PREFIX Dec 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant