Repository navigation
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:8000http://localhost:5173