Updated Store headers to work with nginx
This commit is contained in:
parent
e76d177ff8
commit
5d6319dfcc
|
@ -1,3 +1,3 @@
|
||||||
store_settings:
|
store_settings:
|
||||||
url: "http://192.168.1.250:3000/api"
|
url: "http://store.tp.rulingcom.com/api"
|
||||||
api_key: 'Token token="b38ba5f588a7c5072e88ee15737a4d33"'
|
api_key: 'Token token="2870f77e59168dbe3fbdffba466c7c8d"'
|
||||||
|
|
13
lib/store.rb
13
lib/store.rb
|
@ -9,24 +9,25 @@ class Store
|
||||||
@options_for_get = {
|
@options_for_get = {
|
||||||
headers: {
|
headers: {
|
||||||
"Authorization" => api_key,
|
"Authorization" => api_key,
|
||||||
"X_SiteToken" => site_token,
|
"X-SiteToken" => site_token,
|
||||||
"X_SiteId" => site_id,
|
"X-SiteId" => site_id,
|
||||||
"Content-Type" => "application/json"
|
"Content-Type" => "application/json",
|
||||||
|
'Accept' => 'application/json'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@options_for_client = {
|
@options_for_client = {
|
||||||
headers: {
|
headers: {
|
||||||
"Authorization" => api_key,
|
"Authorization" => api_key,
|
||||||
"Content-Type" => "application/json"
|
"Content-Type" => "application/json",
|
||||||
|
'Accept' => 'application/json'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def templates(options={})
|
def templates(options={})
|
||||||
options = @options_for_get
|
options = @options_for_get
|
||||||
response = self.class.get('/templates', options)
|
self.class.get('/templates', options)
|
||||||
puts response.request.last_uri.to_s
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def extensions(options={})
|
def extensions(options={})
|
||||||
|
|
Loading…
Reference in New Issue