WebServer: Serve X-Frame-Options and X-Content-Type-Options HTTP headers

This commit is contained in:
Brendan Coles 2021-03-05 13:25:08 +00:00 committed by Andreas Kling
parent 87d19273bc
commit 4ae3bfa40d
Notes: sideshowbarker 2024-07-18 21:40:30 +09:00

View file

@ -137,6 +137,8 @@ void Client::send_response(InputStream& response, const HTTP::HttpRequest& reque
StringBuilder builder;
builder.append("HTTP/1.0 200 OK\r\n");
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("Content-Type: ");
builder.append(content_type);
builder.append("\r\n");