BigW Consortium Gitlab

Commit ac6ec8ac by Robert Speicher Committed by Timothy Andrew

Merge branch 'dz-api-x-frame' into 'security-9-2'

Restrict API X-Frame-Options to same origin See merge request !2103
parent 200e8582
---
title: Restrict API X-Frame-Options to same origin
merge_request:
author:
......@@ -44,6 +44,7 @@ module API
end
before { allow_access_with_scope :api }
before { header['X-Frame-Options'] = 'SAMEORIGIN' }
rescue_from Gitlab::Access::AccessDeniedError do
rack_response({ 'message' => '403 Forbidden' }.to_json, 403)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment