Static files rework
See original GitHub issueCurrently, you configure static files like this:
public JavalinConfig addStaticFiles(String classpathPath)
public JavalinConfig addStaticFiles(String path, Location location)
public JavalinConfig addStaticFiles(String urlPathPrefix, String path, Location location)
In addition you have some global properties:
public boolean precompressStaticFiles = false;
public ContextHandler.AliasCheck aliasCheckForStaticFiles = null;
And in addition to that (!), you have that files served from a dir called /immutable
have the max-axe header set to 1 year.
It should be possible to clean this up a bit.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
How to manage static files (e.g. images, JavaScript, CSS)
Configuring static files¶ · Make sure that django.contrib.staticfiles is included in your INSTALLED_APPS . · In your settings file, define STATIC_URL , for ......
Read more >Django won't refresh staticfiles - Stack Overflow
I would see the original base.css but no my update to file.This is on a dev environment. I did not think django cached...
Read more >Static files rework · Issue #1223 · javalin/javalin - GitHub
Currently, you configure static files like this: public JavalinConfig addStaticFiles(String classpathPath) public JavalinConfig ...
Read more >Django does not refresh edited static files - Reddit
Django does not refresh edited static files. Hey! In my settings I have the followings part: STATIC_URL = '/static/'.
Read more >feat(boilerplate): Rework API files so static files work. Remove all ...
feat(boilerplate): Rework API files so static files work. Remove all "app.X" imports, and have manage.sh -r cd into the project directory instead of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There was a suggestion on Discord to add static file handlers as normal
get
routes:get(path, staticFilesHandler, roles)
Current API: