• René Dudfield's avatar
    frontend: Support using a base-url · ef5986fa
    René Dudfield authored
    So you can accept urls at places like /headlamp
    rather than at /. This is useful for people running
    services behind a reverse proxy that need to run
    Headlamp in the same domain rather than a sub domain.
    
    Support using a base-url in various places with the
    getAppURL() function. Like in the router, and some
    other areas it uses URLs.
    
    `npm run build` uses a user supplied PUBLIC_URL, otherwise
    defaults to ./ so it can be search-replaced. Leaving
    `npm run build` as before, in case someone wants to set
    PUBLIC_URL themselves.
    
    To make `npm run build` work on minikube with the default
    memory settings there, the max_old_space_size Node.js command line
    argument is used to reduce memory when building.
    
    backend: Add a -base-url option to tell it which base-url to use.
    Also support replacing the static html file which has a base URL
    hard coded into it in various places.
    ef5986fa