Skip to content

Commit

Permalink
Add x-frame-options test
Browse files Browse the repository at this point in the history
  • Loading branch information
aliu39 committed Sep 21, 2024
1 parent 8b20e90 commit df5d295
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/sentry/toolbar/views/test_iframe_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,8 @@ def test_calls_url_matches(self):
for (i, (args, _)) in enumerate(mock_url_matches.call_args_list):
assert args[0] == referrer
assert args[1] == allowed_origins[i]

def test_x_frame_options(self):
self.project.update_option("sentry:toolbar_allowed_origins", ["https://sentry.io"])
res = self.client.get(self.url, **{REFERRER_HEADER: "https://sentry.io"})
assert res.headers.get("X-Frame-Options") == "ALLOWALL"

0 comments on commit df5d295

Please sign in to comment.