Skip to content

Commit

Permalink
Update aging tests to explicitly use https on httpbin calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
monkpow committed Jul 25, 2023
1 parent e2474ea commit 0f33292
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('proxies headers', function () {

beforeEach(function () {
http = express();
http.use(proxy('http://httpbin.org', {
http.use(proxy('https://httpbin.org', {
headers: {
'X-Current-president': 'taft'
}
Expand Down
8 changes: 4 additions & 4 deletions test/userResDecorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('userResDecorator', function () {

it('has access to original response', function (done) {
var app = express();
app.use(proxy('httpbin.org', {
app.use(proxy('https://httpbin.org', {
userResDecorator: function (proxyRes, proxyResData) {
assert(proxyRes.connection);
assert(proxyRes.socket);
Expand All @@ -56,7 +56,7 @@ describe('userResDecorator', function () {

it('works with promises', function (done) {
var app = express();
app.use(proxy('httpbin.org', {
app.use(proxy('https://httpbin.org', {
userResDecorator: function (proxyRes, proxyResData) {
return new Promise(function (resolve) {
proxyResData.funkyMessage = 'oi io oo ii';
Expand All @@ -80,7 +80,7 @@ describe('userResDecorator', function () {

it('can modify the response data', function (done) {
var app = express();
app.use(proxy('httpbin.org', {
app.use(proxy('https://httpbin.org', {
userResDecorator: function (proxyRes, proxyResData) {
proxyResData = JSON.parse(proxyResData.toString('utf8'));
proxyResData.intercepted = true;
Expand All @@ -101,7 +101,7 @@ describe('userResDecorator', function () {

it('can modify the response headers, [deviant case, supported by pass-by-reference atm]', function (done) {
var app = express();
app.use(proxy('httpbin.org', {
app.use(proxy('https://httpbin.org', {
userResDecorator: function (rsp, data, req, res) {
res.set('x-wombat-alliance', 'mammels');
res.set('content-type', 'wiki/wiki');
Expand Down

0 comments on commit 0f33292

Please sign in to comment.