Run Headlamp with a base-url
Normally Headlamp runs at the root of the domain. Hower you can also ask to run it at a base-url like “/headlamp” for example.
- default at the root of the domain:
A warning about multiple apps on the same sub domain
Hosting multiple websites (apps) on the same origin can lead to possible conflicts between the apps. Each app is able to access information and make requests of the other. Therefore each app needs to be tested together, trusted, and a compatible Content-Security-Policy should be considered for each of them.
If in doubt, host Headlamp on a separate origin (domain or port, don’t use the
How to use with a base-url
./backend/headlamp-server -dev -base-url /headlamp PUBLIC_URL="/headlamp" make run-frontend
Then go to http://localhost:3000/headlamp/ in your browser.
Static build mode
cd frontend && npm install && npm run build && cd .. ./backend/headlamp-server -dev -base-url /headlamp -html-static-dir frontend/build
Then go to http://localhost:4466/headlamp/ in your browser.
--base-url /headlamp to the docker run command. Note the extra “-”.
You can modify your kubernetes deployment file to add
to the containers args.
args: - "-in-cluster" - "-plugins-dir=/headlamp/plugins" - "-base-url=/headlamp"