Skip to content

Duplicate Requests being recorded #12

@jimmyeisenhauer

Description

@jimmyeisenhauer

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'));

});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions