Skip to content

Commit

Permalink
avoid decorate result for json payload (#90)
Browse files Browse the repository at this point in the history
* avoid decorate result for json payload

* checking for presence of authorization for decorating payload
  • Loading branch information
ymhari authored Jul 17, 2023
1 parent da6f87d commit 3431b2a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
module EventSource
module Protocols
module Http
# soap module
module Soap
# Add SOAP security headers and body around the payload.
class PayloadHeaderMiddleware < Faraday::Middleware
def on_request(env)
return env if env.request_headers["Authorization"]

sec_config = SecurityHeaderConfiguration.new(options[:soap_settings])
body_to_encode = env.body || ""
decorate_result = Operations::DecoratePayloadUsingConfiguration.new.call(
Expand Down

0 comments on commit 3431b2a

Please sign in to comment.