Skip to content

Commit

Permalink
fix: ensure requests for text/plain go to the API rather than the UI
Browse files Browse the repository at this point in the history
Otherwise, requests for the text/plain matrix page get the html version returned.
  • Loading branch information
bethesque committed Mar 15, 2020
1 parent 0e60b83 commit 1cf2800
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rack/pact_broker/request_target.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module RequestTarget
extend self

WEB_ASSET_EXTENSIONS = %w[.js .woff .woff2 .css .png .html .map .ttf .ico].freeze
API_CONTENT_TYPES = %w[application/hal+json application/json text/csv application/yaml].freeze
API_CONTENT_TYPES = %w[application/hal+json application/json text/csv application/yaml text/plain].freeze

def request_for_ui?(env)
!(request_for_api?(env))
Expand Down

0 comments on commit 1cf2800

Please sign in to comment.