Skip to content

Commit

Permalink
inspect x-frames options method
Browse files Browse the repository at this point in the history
  • Loading branch information
babz007 committed Sep 17, 2024
1 parent 8c86ad8 commit 5fd4d3c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/controllers/lti13/launches_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,11 @@ def launch_params

#TODO:
#same origin issue with X-frame-Options
#remove hardcoded canvas instance and set a dynamic CSP to allow iframe

#remove hardcoded canvas instance and set a dynamic CSP to allow iframe
def allow_iframe
response.headers.except! 'X-Frame-Options'
Rails.logger.info "Response headers after removing X-Frame-Options: #{response.headers.inspect}"
puts "Response headers after removing X-Frame-Options: #{response.headers.inspect}"
response.headers['Content-Security-Policy'] = "frame-ancestors 'self' https://canvas.endeavour.cs.vt.edu"
end
end

0 comments on commit 5fd4d3c

Please sign in to comment.