Skip to content

Commit 192b27e

Browse files
committed
Improve cloudi_service_http_cowboy1 arguments set_x_content_type_options and set_x_xss_protection by capitalizing the header names for better compatibility.
1 parent 6b42731 commit 192b27e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cloudi_http_cowboy1_handler.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ handle_response(NameIncoming, HeadersOutgoing0, Response,
12911291
ContentTypeSet =:= true ->
12921292
if
12931293
SetXContentTypeOptions =:= true ->
1294-
header_set_if_not(<<"x-content-type-options">>,
1294+
header_set_if_not(<<"X-Content-Type-Options">>,
12951295
<<"nosniff">>,
12961296
HeadersOutgoing3);
12971297
SetXContentTypeOptions =:= false ->
@@ -1304,7 +1304,7 @@ handle_response(NameIncoming, HeadersOutgoing0, Response,
13041304
ContentTypeHTML =:= true ->
13051305
HeadersOutgoing5 = if
13061306
SetXXSSProtection =:= true ->
1307-
header_set_if_not(<<"x-xss-protection">>,
1307+
header_set_if_not(<<"X-XSS-Protection">>,
13081308
<<"0">>,
13091309
HeadersOutgoing4);
13101310
SetXXSSProtection =:= false ->

0 commit comments

Comments
 (0)