-
-
Notifications
You must be signed in to change notification settings - Fork 672
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
Use whitenoise for static file handling #6662
Conversation
- Only add wildcard * in DEBUG mode - Exit if ALLOWED_HOSTS not defined
- Any requests to /static/ are handled by whitenoise - If an external reverse proxy (e.g. Caddy) is being used, this will not make a difference
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
@LavissaWoW @wolflu05 @matmair after much reading, this seems like the only reliably way around this issue. Even though it is a very small target for the issue (static file CORS in dev mode, from the vite server), this seems like a reasonable solution. I looked into whether this would be a good solution for serving static / media files in general - however it does not handle media files. So, stuck with Caddy (or similar) solution for now |
@SchrodingersGat Probably unrelated, but should we fix the |
@LavissaWoW I've forgotten the favicon issue, can you remind me? |
@SchrodingersGat I'm not able to reliably reproduce the console error message. |
Ok if you see it again please raise an issue :) |
Example
http://localhost:8000
http://localhost:5173