Browse Source

paypro: example - use strict paypro headers.

patch-2
Christopher Jeffrey 11 years ago
parent
commit
076dab2a47
  1. 18
      examples/PayPro/server.js

18
examples/PayPro/server.js

@ -71,12 +71,18 @@ app.use(function(req, res, next) {
}; };
res.setHeader('Access-Control-Allow-Origin', '*'); res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET,POST');
if (req.method === 'OPTIONS') { res.setHeader('Access-Control-Allow-Headers', [
res.setHeader('Access-Control-Allow-Methods', 'GET,POST'); 'Host',
res.setHeader('Access-Control-Allow-Headers', req.headers['access-control-request-headers']); 'Connection',
return res.send(200); 'Content-Length',
} 'Accept',
'Origin',
'User-Agent',
'Content-Type',
'Accept-Encoding',
'Accept-Language'
].join(','));
res.setHeader('Accept', PayPro.PAYMENT_CONTENT_TYPE); res.setHeader('Accept', PayPro.PAYMENT_CONTENT_TYPE);

Loading…
Cancel
Save