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

When moonraker is built with --base, it still tries to get config.json from / #1600

Open
Laikulo opened this issue Oct 10, 2023 · 2 comments · May be fixed by #1873
Open

When moonraker is built with --base, it still tries to get config.json from / #1600

Laikulo opened this issue Oct 10, 2023 · 2 comments · May be fixed by #1873
Labels
⚡ Type: Bug Something isn't working

Comments

@Laikulo
Copy link

Laikulo commented Oct 10, 2023

Mainsail Version:

g932a2c35

Browser:

Firefox

Device:

Laptop

Operating System:

Windows

What happened?

After building mainsail with --base=/mainsail/, and serving that at /mainsail/ on an httpd: When browsing to /mainsail/, mainsail tries to retrieve config.json from /

What did you expect to happen instead?

Mainsail to retrieve config.json from /mainsail/

How to reproduce this bug?

  1. npm ci
  2. npm exec vite build --base=/mainsail/
  3. cp base/* -r /srv/www/mainsail/
  4. firefox localhost/mainsail/

Additional information:

No response

@Laikulo Laikulo added the ⚡ Type: Bug Something isn't working label Oct 10, 2023
@meteyou
Copy link
Member

meteyou commented Oct 10, 2023

Mainsail don't support the base attribute. But there is a PR which will add something like this.

@Laikulo
Copy link
Author

Laikulo commented Jan 15, 2024

Here's an example of a workaround with Caddy, that allows mainsail to work as normal:

@mainsail_config_bodge {
  path /config.json
  header Referer */mainsail/*
}
redir @mainsail_config_bodge /mainsail/config.json permanent

@meteyou meteyou linked a pull request May 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡ Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants