Skip to content

Commit

Permalink
DISABLE_PROXY_URL_FOR_ALL for HEAD request
Browse files Browse the repository at this point in the history
  • Loading branch information
nleush committed Jun 26, 2024
1 parent afb22c2 commit 59bf1b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,4 @@ app.get('/', function(req, res) {
res.end();
});

process.title = "iframely";
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
process.title = "iframely";
5 changes: 3 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export function prepareRequestOptions(request_options, options) {
: CONFIG.PROXY_URL + encodeURIComponent(uri);
} else if (proxy.proxy_url && /{url}/.test(proxy.proxy_url)) {
request_options.uri = proxy.proxy_url.replace(/{url}/, encodeURIComponent(uri));
} else if (CONFIG.PROXY_URL_FOR_ALL) {
} else if (CONFIG.PROXY_URL_FOR_ALL && !options.DISABLE_PROXY_URL_FOR_ALL) {
request_options.uri = /{url}/.test(CONFIG.PROXY_URL_FOR_ALL)
? CONFIG.PROXY_URL_FOR_ALL.replace(/{url}/, encodeURIComponent(uri))
: CONFIG.PROXY_URL_FOR_ALL + encodeURIComponent(uri);
Expand Down Expand Up @@ -138,7 +138,7 @@ export function prepareRequestOptions(request_options, options) {
}
} else {

if (CONFIG.PROXY_URL_FOR_ALL) {
if (CONFIG.PROXY_URL_FOR_ALL && !options.DISABLE_PROXY_URL_FOR_ALL) {
request_options.uri = /{url}/.test(CONFIG.PROXY_URL_FOR_ALL)
? CONFIG.PROXY_URL_FOR_ALL.replace(/{url}/, encodeURIComponent(uri))
: CONFIG.PROXY_URL_FOR_ALL + encodeURIComponent(uri);
Expand Down Expand Up @@ -280,6 +280,7 @@ var getHead = function(url, options, callbacks) {
// jar: jar,

// Reviewed.
DISABLE_PROXY_URL_FOR_ALL: true,
uri: url,
method: 'HEAD',
headers: {
Expand Down

0 comments on commit 59bf1b6

Please sign in to comment.