frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Feature: add support for serving from custom path

Open Squixx opened this issue 10 months ago • 2 comments

Description

I want to run dependency track frontend on a path instead of /, but doing this currently would require to do a full rebuild of the frontend. This PR could be a possible solution direction.

I've seen the reference to:

 // Relative paths cannot be supported. Research by @nscur0 - https://owasp.slack.com/archives/CTC03GX9S/p1608400149085400
  publicPath: '/',

However I can not open this link, so am oblivious to any previous research

I'll update the docs once it's clear this is the way forward

Addressed Issue

https://github.com/DependencyTrack/dependency-track/discussions/1514

Additional Details

setting the BASE_HREF env variable allows you to set a path

Checklist

Squixx avatar Apr 03 '24 14:04 Squixx

similar to #23

fnxpt avatar Apr 23 '24 19:04 fnxpt

similar to #23

Does that work with oidc? This pr also has working oidc, but I'd be happy if either could move forward

Squixx avatar Apr 23 '24 21:04 Squixx

Sorry for the long wait @Squixx, I'll have a look at this next and have assigned it to v4.12.

nscuro avatar Jun 18 '24 17:06 nscuro

Again sorry for the delay! Overall this looks good to me.

Just a minor nitpick about naming of the env var.

Also, it would be good to add a few words about how to configure this in the docs: https://github.com/DependencyTrack/dependency-track/blob/master/docs/_docs/getting-started/configuration.md#frontend

added docs in https://github.com/DependencyTrack/dependency-track/pull/3899

Squixx avatar Jul 01 '24 07:07 Squixx