-
Notifications
You must be signed in to change notification settings - Fork 32
Description
I have set up sepia with the below express and proxy server and I am getting two recordings 1 with http and 1 with https. The server is setup as http and proxies to https. Is this something I could fix on the sepia side? Or is this with how the proxy is handling the http requests?
Thanks!
var server = express();
server.set('port', 3000);
var apiProxy = httpProxy.createProxyServer();
var apiForwardingUrl = 'https://commerce-api.example.com';
console.log('Forwarding API requests to ' + apiForwardingUrl);
// commerce api
server.all("/commerce/*", function(req, res) {
apiProxy.web(req, res, {
target: apiForwardingUrl,
agent: https.globalAgent,
headers: {
host: 'commerce-api.example.com'
}
});
});
server.listen(server.get('port'), function() {
console.log(' server'.blue + ' started '.green.bold + 'on port '.blue + server.get('port'));
});