Merge pull request #3 from openneo:neopets-url-origin
Use secret NEOPETS_URL_ORIGIN to bypass HTTPS
This commit is contained in:
commit
c9117fb318
2 changed files with 4 additions and 2 deletions
|
@ -5,7 +5,8 @@ class NeopetsUser
|
|||
include ActiveModel::Conversion
|
||||
extend ActiveModel::Naming
|
||||
|
||||
GATEWAY_URL = 'http://www.neopets.com/amfphp/gateway.php'
|
||||
NEOPETS_URL_ORIGIN = ENV['NEOPETS_URL_ORIGIN'] || 'http://www.neopets.com'
|
||||
GATEWAY_URL = NEOPETS_URL_ORIGIN + '/amfphp/gateway.php'
|
||||
GET_PETS_METHOD = RocketAMF::RemoteGateway.new(GATEWAY_URL).
|
||||
service('MobileService').action('getPets')
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@ require 'rocketamf/remote_gateway'
|
|||
require 'ostruct'
|
||||
|
||||
class Pet < ActiveRecord::Base
|
||||
GATEWAY_URL = 'http://www.neopets.com/amfphp/gateway.php'
|
||||
NEOPETS_URL_ORIGIN = ENV['NEOPETS_URL_ORIGIN'] || 'http://www.neopets.com'
|
||||
GATEWAY_URL = NEOPETS_URL_ORIGIN + '/amfphp/gateway.php'
|
||||
PET_VIEWER = RocketAMF::RemoteGateway.new(GATEWAY_URL).
|
||||
service('CustomPetService').action('getViewerData')
|
||||
PET_NOT_FOUND_REMOTE_ERROR = 'PHP: Unable to retrieve records from the database.'
|
||||
|
|
Loading…
Reference in a new issue