We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14e1a38 commit 8b6fb24Copy full SHA for 8b6fb24
lib/insights/api/common/satellite_compensation/middleware.rb
@@ -12,14 +12,10 @@ def initialize(app)
12
end
13
14
def call(env)
15
- if env['HTTP_USER_AGENT'] =~ /foreman|satellite/i
+ if env['HTTP_USER_AGENT'] =~ /foreman|satellite/i && env['CONTENT_TYPE'] == ''
16
# Sometimes Satellite forwards the client requests with an empty string
17
# as content-type and Rails does not like it.
18
- env['CONTENT_TYPE'] = nil if env['CONTENT_TYPE'] == ''
19
-
20
- # There is an additional branch_id parameter coming from Satellite that
21
- # fails on the stricter checking of params in our REST API.
22
- Rack::Request.new(env).delete_param('branch_id')
+ env['CONTENT_TYPE'] = nil
23
24
25
@app.call(env)
0 commit comments