Updated Store headers to work with nginx

This commit is contained in:
Saurabh Bhatia 2014-02-14 16:57:05 +08:00
parent e76d177ff8
commit 5d6319dfcc
2 changed files with 9 additions and 8 deletions

View File

@ -1,3 +1,3 @@
store_settings:
url: "http://192.168.1.250:3000/api"
api_key: 'Token token="b38ba5f588a7c5072e88ee15737a4d33"'
url: "http://store.tp.rulingcom.com/api"
api_key: 'Token token="2870f77e59168dbe3fbdffba466c7c8d"'

View File

@ -9,24 +9,25 @@ class Store
@options_for_get = {
headers: {
"Authorization" => api_key,
"X_SiteToken" => site_token,
"X_SiteId" => site_id,
"Content-Type" => "application/json"
"X-SiteToken" => site_token,
"X-SiteId" => site_id,
"Content-Type" => "application/json",
'Accept' => 'application/json'
}
}
@options_for_client = {
headers: {
"Authorization" => api_key,
"Content-Type" => "application/json"
"Content-Type" => "application/json",
'Accept' => 'application/json'
}
}
end
def templates(options={})
options = @options_for_get
response = self.class.get('/templates', options)
puts response.request.last_uri.to_s
self.class.get('/templates', options)
end
def extensions(options={})