Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stray /None/ in API calls to api/v2/config/main #3144

Open
timbrigham-oc opened this issue Feb 28, 2025 · 0 comments
Open

Stray /None/ in API calls to api/v2/config/main #3144

timbrigham-oc opened this issue Feb 28, 2025 · 0 comments
Assignees
Labels

Comments

@timbrigham-oc
Copy link
Contributor

Describe the bug
Calls to api/v2/config/main contain a stray 'None' in the URL, for example None/api/v2/config/main.

To Reproduce
Steps to reproduce the behavior:
Pull the current main branch for CALDERA per install docs. Enable SSL plugin (this isn't a problem using the default http://localhost:8888).

This results in 405 errors at the following URL: https://caldera.example.com/None/api/v2/config/main when attempting to sign in (at a minimum)

Expected behavior
The problem appears to be the '/None/' in the URL. Once I had a cookie and could successfully auth, I was able to verify https://caldera.example.com/api/v2/config/main returns data.

Desktop (please complete the following information):
I've seen this across multiple modern browsers - Edge, Chome, Firefox all have the same behavior.

Additional context
This can be avoided by a hotfix to the haproxy config to bounce the call to the internal address, but it doesn't address the underlying issue.

This screenshot shows my custom redirect (302 status code instead of 405 before I adjusted the config) as well as the underlying error still being present.

Image

frontend caldera-https
    bind *:443 ssl crt plugins/ssl/conf/certificate.pem
    bind *:8443 ssl crt plugins/ssl/conf/certificate.pem
    http-request add-header proxy_port 443
    http-request set-header X-Forwarded-Proto https
    # These two lines are what I've updated
    acl is_none_api path_beg /None/api
    http-request redirect location %[path,regsub(^/None,)] if is_none_api  
    default_backend caldera_server

backend caldera_server
    balance leastconn
    cookie SERVERUSED insert indirect nocache
    default-server maxconn 20
    server caldera_main 127.0.0.1:8888 cookie caldera_main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants