Change no-cache to no-store. (#208)

This commit is contained in:
Kavin 2022-03-02 20:38:22 +00:00 committed by GitHub
parent 79b7cdddf1
commit 72666ecf83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,8 +44,8 @@ public class ServerLauncher extends MultithreadedHttpServerLauncher {
AsyncServlet mainServlet(Executor executor) { AsyncServlet mainServlet(Executor executor) {
RoutingServlet router = RoutingServlet.create() RoutingServlet router = RoutingServlet.create()
.map(GET, "/healthcheck", request -> getRawResponse("OK".getBytes(UTF_8), "text/plain", "no-cache")) .map(GET, "/healthcheck", request -> getRawResponse("OK".getBytes(UTF_8), "text/plain", "no-store"))
.map(GET, "/version", AsyncServlet.ofBlocking(executor, request -> getRawResponse(Constants.VERSION.getBytes(UTF_8), "text/plain", "no-cache"))) .map(GET, "/version", AsyncServlet.ofBlocking(executor, request -> getRawResponse(Constants.VERSION.getBytes(UTF_8), "text/plain", "no-store")))
.map(HttpMethod.OPTIONS, "/*", request -> HttpResponse.ofCode(200)) .map(HttpMethod.OPTIONS, "/*", request -> HttpResponse.ofCode(200))
.map(GET, "/webhooks/pubsub", request -> HttpResponse.ok200().withPlainText(Objects.requireNonNull(request.getQueryParameter("hub.challenge")))) .map(GET, "/webhooks/pubsub", request -> HttpResponse.ok200().withPlainText(Objects.requireNonNull(request.getQueryParameter("hub.challenge"))))
.map(POST, "/webhooks/pubsub", AsyncServlet.ofBlocking(executor, request -> { .map(POST, "/webhooks/pubsub", AsyncServlet.ofBlocking(executor, request -> {