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

Allow tuning some static resources serving properties #30068

Merged
merged 1 commit into from
Jan 3, 2023

Conversation

brunolmfg
Copy link
Contributor

@brunolmfg brunolmfg commented Dec 24, 2022

Fixes #15320

This implementation will allow tuning the following properties available setting the corresponding in StaticHandler instances:

quarkus.http.static-resources.index-page=index.html
quarkus.http.static-resources.include-hidden=true
quarkus.http.static-resources.enable-range-support=true
quarkus.http.static-resources.caching-enabled=true
quarkus.http.static-resources.cache-entry-timeout=30S
quarkus.http.static-resources.max-age=24H
quarkus.http.static-resources.max-cache-size=10000

The example above is using the default values as reference.

@brunolmfg brunolmfg force-pushed the allow-static-resources-config branch 3 times, most recently from 0e3521c to 33bd4ff Compare December 25, 2022 18:08
@brunolmfg brunolmfg marked this pull request as ready for review December 25, 2022 22:31
Copy link
Member

@cescoffier cescoffier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - but the documentation is missing.

@cescoffier
Copy link
Member

Also, you would need to squash your commits.

The following properties will be available as runtime configuration:

```properties
quarkus.http.static-resources.index-page=index.html
quarkus.http.static-resources.include-hidden=true
quarkus.http.static-resources.enable-range-support=true
quarkus.http.static-resources.caching-enabled=true
quarkus.http.static-resources.cache-entry-timeout=30S
quarkus.http.static-resources.max-age=24H
quarkus.http.static-resources.max-cache-size=10000
```
The example above is using the default values.

A deprecated internal build item was replaced with the SPI alternative.
@brunolmfg brunolmfg force-pushed the allow-static-resources-config branch from 33bd4ff to 615cb02 Compare January 2, 2023 19:14
@brunolmfg brunolmfg requested a review from cescoffier January 2, 2023 20:33
Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@geoand geoand merged commit f927729 into quarkusio:main Jan 3, 2023
@quarkus-bot quarkus-bot bot added this to the 2.16 - main milestone Jan 3, 2023
@quarkus-bot quarkus-bot bot added the kind/enhancement New feature or request label Jan 3, 2023
@brunolmfg brunolmfg deleted the allow-static-resources-config branch January 3, 2023 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide property to indicate the index page for static resources
3 participants