-
Notifications
You must be signed in to change notification settings - Fork 557
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
web: change base url for capa Explorer Web #2267
web: change base url for capa Explorer Web #2267
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please amend the PR to use URLs relative to the capa explorer web application. I would like the web application to be able to be hosted with any prefix, not to be hardcoded to use a specific base URL
web/explorer/vite.config.js
Outdated
@@ -8,7 +8,7 @@ export default defineConfig(({ command, mode }) => { | |||
const isBundle = mode === "bundle"; | |||
|
|||
return { | |||
base: isBundle ? "/" : "/capa/", | |||
base: isBundle ? "/" : "/capa/explorer", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base: isBundle ? "/" : "/capa/explorer", | |
base: "./", |
I think this might do it.
via: https://stackoverflow.com/a/69746868
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fix works.
tried it here: https://github.com/williballenthin/capa/blob/wb/webui-actions-1/web/explorer/vite.config.js
which now works here: https://williballenthin.github.io/capa/explorer/#/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works. The single page build npm run build:bundle
remains the same as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet, thanks for confirming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
closes #2266 (and #2262)
This PR changes the base url of capa Explorer Web to
/capa/explorer
so that it can be hosted onmandiant.github.com/capa/explorer
Checklist