Commit Graph

5 Commits

Author SHA1 Message Date
Matt-Yorkley
7124c6bb73 Fix embedded response headers
Rails 4 adds an extra layer of "default" headers that override any that are missing (or deleted). This was breaking embedded shopfront responses.

Fixes:

  74) setting response headers for embedded shopfronts with embedded shopfronts enabled with a valid whitelist allows iframes on certain pages when enabled in configuration
      Failure/Error: expect(response.headers['X-Frame-Options']).to be_nil

        expected: nil
             got: "SAMEORIGIN"
      # ./spec/requests/embedded_shopfronts_headers_spec.rb:54:in `block (4 levels) in <top (required)>'

  75) setting response headers for embedded shopfronts with embedded shopfronts enabled with www prefix matches the URL structure in the header
      Failure/Error: expect(response.headers['X-Frame-Options']).to be_nil

        expected: nil
             got: "SAMEORIGIN"
      # ./spec/requests/embedded_shopfronts_headers_spec.rb:75:in `block (4 levels) in <top (required)>'
2020-02-27 20:53:09 +01:00
luisramos0
9404aacfb2 run rubocop --auto-correct 2019-11-10 18:42:43 +00:00
JASON KNOEPFLER
91a52ead58 Guard against malformed request referer 2019-09-14 09:13:44 -07:00
Matt-Yorkley
172fa168ea Change layout attribute to method with question mark 2018-06-21 15:19:40 +01:00
Matt-Yorkley
ff0e0d9f3d Move logic from ApplicationController to service and improve clarity 2018-06-20 01:28:35 +01:00