Skip to content
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

Merged

Conversation

s-ff
Copy link
Collaborator

@s-ff s-ff commented Aug 9, 2024

closes #2266 (and #2262)

This PR changes the base url of capa Explorer Web to /capa/explorer so that it can be hosted on mandiant.github.com/capa/explorer

Checklist

  • No CHANGELOG update needed
  • No new tests needed
  • No documentation update needed

@s-ff s-ff added the webui related to capa results web visualization label Aug 9, 2024
Copy link
Collaborator

@williballenthin williballenthin left a 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

@@ -8,7 +8,7 @@ export default defineConfig(({ command, mode }) => {
const isBundle = mode === "bundle";

return {
base: isBundle ? "/" : "/capa/",
base: isBundle ? "/" : "/capa/explorer",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
base: isBundle ? "/" : "/capa/explorer",
base: "./",

I think this might do it.
via: https://stackoverflow.com/a/69746868

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet, thanks for confirming

Copy link
Collaborator

@williballenthin williballenthin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@williballenthin williballenthin merged commit 401a0ee into mandiant:master Aug 9, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
webui related to capa results web visualization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

web: use relative URLs to reference resources
2 participants