-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added support for more HTTP response headers #227
base: master
Are you sure you want to change the base?
Conversation
this change reflects the same configuratin present in tor2web.utils.ssl and applied on globaleaks in globaleaks in relation to ticket: globaleaks/globaleaks-whistleblowing-software#1182
For example, the "Link" and "X-Pingback" headers on: http://54ogum7gwxhtgiya.onion This patch makes those headers (and others) work as intended.
Correction, URL is: http://54ogum7gwxhtgiya.onion/blog/index.php/welcome-home/ |
1 similar comment
|
|
|
40e64bd
to
5605f62
Compare
aabeadf
to
aecb3d0
Compare
652cb18
to
d8a5096
Compare
a088782
to
de732c0
Compare
8077cf5
to
c45be7f
Compare
49963c6
to
3c31643
Compare
e0678e9
to
a325583
Compare
b1be310
to
501c22a
Compare
var xmlhttp = new XMLHttpRequest(); | ||
|
||
xmlhttp.onreadystatechange=function() { | ||
if (xmlhttp.readyState==4 && xmlhttp.status==200) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: Replace ==4·&&·xmlhttp.status==
with ·==·4·&&·xmlhttp.status·==·
if (xmlhttp.readyState==4 && xmlhttp.status==200) { | |
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { |
window.location.href = url; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: Insert ;
} | |
}; |
// Test if the user is using Tor and in that case | ||
// redirects the user to provided url | ||
try { | ||
if (typeof(test_url) === 'undefined') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: Replace (test_url)·===·'undefined'
with ·test_url·===·"undefined"
if (typeof(test_url) === 'undefined') { | |
if (typeof test_url === "undefined") { |
// redirects the user to provided url | ||
try { | ||
if (typeof(test_url) === 'undefined') { | ||
var test_url = 'https://antani.tor2web.org/checktor'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: Replace 'https://antani.tor2web.org/checktor'
with "https://antani.tor2web.org/checktor"
var test_url = 'https://antani.tor2web.org/checktor'; | |
var test_url = "https://antani.tor2web.org/checktor"; |
if (window.XMLHttpRequest) { | ||
var xmlhttp = new XMLHttpRequest(); | ||
|
||
xmlhttp.onreadystatechange=function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codacy has a fix for the issue: Replace =function
with ·=·function·
xmlhttp.onreadystatechange=function() { | |
xmlhttp.onreadystatechange = function () { |
For example, the "Link" and "X-Pingback" headers on:
http://54ogum7gwxhtgiya.onion
This patch makes those headers (and others) work as intended.