Skip to content

Feat: Allow web interface to serve content behind an optional URL path prefix#1124

Open
ngearhart wants to merge 2 commits intoneuvector:mainfrom
ngearhart:feat/enable-path-prefix-http
Open

Feat: Allow web interface to serve content behind an optional URL path prefix#1124
ngearhart wants to merge 2 commits intoneuvector:mainfrom
ngearhart:feat/enable-path-prefix-http

Conversation

@ngearhart
Copy link

@ngearhart ngearhart commented Jan 27, 2026

The Neuvector UI (manager) requires all traffic to be hosted at the root URL behind an FQDN. Although this fits most deployment scenarios, some users (me included) need to route traffic based on URL path prefixes. For example, instead of hosting at "https://neuvector.example.com/", I use "https://example.com/neuvector/".

This PR adds the necessary scaffolding to support a path prefix as described using the optional PATH_PREFIX environment variable. If unset, the Neuvector manager will continue to work as previous, serving at the root URL.

This environment variable must not contain a preceding slash.

To test, simply set the environment variable in your environment, and navigate to that new path (for example, if you usually navigate to http://localhost:8443, set the var to test-path and navigate to http://localhost:8443/test-path/).

…path prefix

Signed-off-by: Noah Gearhart <noah.gearhart@darkwolfsolutions.com>
@ngearhart ngearhart requested a review from a team as a code owner January 27, 2026 15:24
@ngearhart ngearhart requested a review from lsongsuse January 27, 2026 15:24
Signed-off-by: Noah Gearhart <noah.gearhart@darkwolfsolutions.com>
@ngearhart
Copy link
Author

I want to add that I am not married to the environment variable being named PATH_PREFIX - I have a coworker who prefers BASENAME - so let me know if you would like me to change it. That is an easy fix.

@wilderk
Copy link

wilderk commented Jan 30, 2026

I am the other person ngearhart was talking about. My suggestion was BASE_PATH. And there are other alternatives like RELATIVE_PATH, etc. Just depends on what the reviewers prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants