sfdc_proxy 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sfdc_proxy.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a000cae5753b9c1c183e8e5cf3fd694ab097bdbf
|
4
|
+
data.tar.gz: cfa79a71d937aa66aebf21728820adf250ff84e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8a1c508aa56242589c2f5c2b1c7667245e53307b1010f95c658c4bcff684ef100252a748e3a5e307854d3fb1e2e6464ef81cd275325d4e0ad68c8af594ebd17
|
7
|
+
data.tar.gz: 189bd1e1a5e3460a8b74fce37550971a5dedd79b61444614fc7acbcff8bbe7f4dd86b2b9458b1ada1d5950288f0623facd1b19b959ab9f5d8c44d911e3ed55c5
|
data/lib/sfdc_proxy.rb
CHANGED
@@ -14,10 +14,10 @@ class SalesforceProxy < Sinatra::Base
|
|
14
14
|
end
|
15
15
|
|
16
16
|
proxy '/proxy*' do
|
17
|
-
puts request.env.to_yaml
|
17
|
+
#puts request.env.to_yaml
|
18
18
|
body = request.body.read
|
19
19
|
query_string = request.query_string
|
20
|
-
sf_endpoint = request.env['HTTP_X_SALESFORCEPROXY_ENDPOINT']
|
20
|
+
sf_endpoint = request.env['HTTP_X_SALESFORCEPROXY_ENDPOINT'] || 'http://login.salesforce.com/services/oauth2/token'
|
21
21
|
auth_header = request.env['HTTP_AUTHORIZATION']
|
22
22
|
content_type = (sf_endpoint.include?('oauth2') && 'application/x-www-form-urlencoded') || 'application/json'
|
23
23
|
http_method = request.env['REQUEST_METHOD']
|