diff --git a/app/models/pet.rb b/app/models/pet.rb index 16e682a6..e085a9db 100644 --- a/app/models/pet.rb +++ b/app/models/pet.rb @@ -2,7 +2,7 @@ require 'rocketamf/remote_gateway' require 'ostruct' class Pet < ApplicationRecord - NEOPETS_URL_ORIGIN = ENV['NEOPETS_URL_ORIGIN'] || 'http://www.neopets.com' + NEOPETS_URL_ORIGIN = ENV['NEOPETS_URL_ORIGIN'] || 'https://www.neopets.com' GATEWAY_URL = NEOPETS_URL_ORIGIN + '/amfphp/gateway.php' PET_VIEWER = RocketAMF::RemoteGateway.new(GATEWAY_URL). service('CustomPetService').action('getViewerData') diff --git a/lib/rocketamf/remote_gateway/request.rb b/lib/rocketamf/remote_gateway/request.rb index c289f69a..4dcaafda 100644 --- a/lib/rocketamf/remote_gateway/request.rb +++ b/lib/rocketamf/remote_gateway/request.rb @@ -80,6 +80,7 @@ module RocketAMF def send_request(uri, req) begin http = Net::HTTP.new(uri.host, uri.port) + http.use_ssl = true if uri.instance_of? URI::HTTPS return http.request(req) rescue Exception => e raise ConnectionError, e.message