Skip to content

Commit

Permalink
Respond with cache control max age of 1 year
Browse files Browse the repository at this point in the history
  • Loading branch information
mmajis committed Jun 14, 2021
1 parent 544df49 commit f5e197e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/nitor/plantuml/lambda/LambdaBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ void sendDiagramResponse(OutputStream outputStream, String base64Response, Diagr
JSONObject headerJson = new JSONObject();
headerJson.put("Access-Control-Allow-Origin", "*");
headerJson.put("Content-Type", diagramType.getMimeType());
headerJson.put("Cache-Control", "public, max-age=31536000"); //1 year max age

responseJson.put("statusCode", statusCode);
responseJson.put("headers", headerJson);
Expand Down

0 comments on commit f5e197e

Please sign in to comment.