Skip to content

Commit f3bdf1e

Browse files
author
zhourenjian@gmail.com
committed
Do not set "Referer" header for JavaScript based HTTP request
1 parent d4dfb3d commit f3bdf1e

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

sources/net.sf.j2s.ajax/j2sajax/HttpRequest.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ c$.prototype.open = function (method, url, async, user, password) {
7676
// }
7777
//} catch (e) {
7878
//}
79-
try {
80-
var l = window.location;
81-
this.transport.setRequestHeader ("Referer",
82-
l.protocol + "//" + l.host + (l.port != "" ? ":" + l.port : "") + "/");
83-
} catch (e) {
84-
}
79+
//try {
80+
// var l = window.location;
81+
// this.transport.setRequestHeader ("Referer",
82+
// l.protocol + "//" + l.host + (l.port != "" ? ":" + l.port : "") + "/");
83+
//} catch (e) {
84+
//}
8585
if (method != null && method.toLowerCase () == "post") {
8686
try {
8787
this.transport.setRequestHeader ("Content-type",

0 commit comments

Comments
 (0)