Skip to content

Commit

Permalink
feat(webserver): enable etags on static resources
Browse files Browse the repository at this point in the history
  • Loading branch information
notthetup committed Feb 27, 2024
1 parent 3b173f2 commit a5ceae9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/arl/fjage/connectors/WebServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ public void add(String context, String resource, String cacheControl) {
resHandler.setWelcomeFiles(new String[]{ "index.html" });
resHandler.setDirectoriesListed(false);
resHandler.setCacheControl(cacheControl);
resHandler.setEtags(true);
handler.setHandler(resHandler);
staticContexts.put(context, handler);
add(handler);
Expand Down Expand Up @@ -306,6 +307,7 @@ public void add(String context, File dir, String cacheControl) {
resHandler.setWelcomeFiles(new String[]{ "index.html" });
resHandler.setDirectoriesListed(false);
resHandler.setCacheControl(cacheControl);
resHandler.setEtags(true);
handler.setHandler(resHandler);
staticContexts.put(context, handler);
add(handler);
Expand Down

0 comments on commit a5ceae9

Please sign in to comment.