WebServer: Set no-cache header for responses

This sets the Pragma: no-cache header. Using Cache-Control would be
preferable but that's not part of the HTTP/1.0 standard.
This commit is contained in:
Gunnar Beutner 2021-05-17 20:34:31 +02:00 committed by Andreas Kling
parent 7aca2d181a
commit 8c96640157
Notes: sideshowbarker 2024-07-18 17:55:28 +09:00

View file

@ -123,6 +123,7 @@ void Client::send_response(InputStream& response, const HTTP::HttpRequest& reque
builder.append("Server: WebServer (SerenityOS)\r\n");
builder.append("X-Frame-Options: SAMEORIGIN\r\n");
builder.append("X-Content-Type-Options: nosniff\r\n");
builder.append("Pragma: no-cache\r\n");
builder.append("Content-Type: ");
builder.append(content_type);
builder.append("\r\n");