-
Notifications
You must be signed in to change notification settings - Fork 564
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
4.x: Static content from classpath improvements #9471
Comments
Is it possible to process the files as they are extracted from the class path? For example, CSS files may have comments, that I might not want to serve to the client , and would like to strip off. |
I think this should be done at build time and your deployment should contain the files you want to serve (minified css, javascript etc.). Also Helidon does not have such a feature, as we need to work with the content length of the file (i.e. when a range is requested, to correctly provide |
The PR will have the following updates:
Example of a configuration: server:
features:
# the new static content feature, automatically discovered
static-content:
# (optional) configuration of temporary storage
temporary-storage:
directory: "./target/helidon/tmp"
file-prefix: "helidon-custom"
file-suffix: ".cache"
# delete-on-exit: false
# classpath handlers (context to serve on webserver and location on classpath)
classpath:
- context: "/classpath"
location: "web"
- context: "/singleclasspath"
location: "web/resource.txt"
# file system handlers (context to serve on webserver and location on file system)
path:
- context: "/path"
location: "./src/test/resources/web"
- context: "/singlepath"
location: "./src/test/resources/web/resource.txt" |
Currently we generate temporary files for extracted jar entries as
ws-****.je
A few improvements could be done:
helidon-
(orhelidon-ws
) prefix to clearly bind them to HelidonThe text was updated successfully, but these errors were encountered: