Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/services/service_provider_updater.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class ServiceProviderUpdater
def self.ping(body=nil)
resp = conn.post {|req| req.body = body.to_json if body.present? }
resp = conn.post {|req| req.body = Zlib.gzip(body.to_json) if body.present? }

status_code = resp.status
return status_code if status_code == 200
Expand All @@ -25,7 +25,8 @@ def idp_url
def headers
{
'X-LOGIN-DASHBOARD-TOKEN' => IdentityConfig.store.dashboard_api_token,
'Content-Type' => 'application/json',
'Content-Type' => 'gzip/json',
'Content-Encoding' => 'gzip',
}
end

Expand Down
3 changes: 2 additions & 1 deletion spec/services/service_provider_updater_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
let(:headers) do
{
'X-LOGIN-DASHBOARD-TOKEN' => token,
'Content-Type' => 'application/json'
'Content-Type' => 'gzip/json',
'Content-Encoding' => 'gzip'
}
end

Expand Down