Skip to content

Commit b0741d5

Browse files
committed
Set x-content-type-options for static content
1 parent f58a966 commit b0741d5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ and this project adheres to
2222
- Add test gauge metric that can be used to set arbitrary values for the purposes
2323
of triggering behaviour in metric consumers.
2424
[3510](https://github.com/OpenFn/lightning/issues/3510)
25+
- Enable X-Content-Type-Options header for static pages.
26+
[#3534](https://github.com/OpenFn/lightning/issues/3534)
2527

2628
### Changed
2729

lib/lightning_web/endpoint.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ defmodule LightningWeb.Endpoint do
3636
at: "/",
3737
from: :lightning,
3838
gzip: true,
39-
only: LightningWeb.static_paths()
39+
only: LightningWeb.static_paths(),
40+
headers: [
41+
{"x-content-type-options", "nosniff"}
42+
]
4043

4144
if Code.ensure_loaded?(Tidewave) do
4245
plug Tidewave

0 commit comments

Comments
 (0)