mirror of
https://github.com/KevinMidboe/zoff.git
synced 2026-02-11 03:49:42 +00:00
Securing cors
This commit is contained in:
4
server/node_modules/cors-anywhere/lib/cors-anywhere.js
generated
vendored
4
server/node_modules/cors-anywhere/lib/cors-anywhere.js
generated
vendored
@@ -226,13 +226,13 @@ var getHandler = exports.getHandler = function(options, proxy) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return function(req, res) {
|
return function(req, res) {
|
||||||
/*if(req.headers.referer && req.headers.referer.substring(0,14) !== "http://zoff.no")
|
if(req.headers.referer && req.headers.referer.substring(0,15) !== "https://zoff.no")
|
||||||
{
|
{
|
||||||
res.writeHead(401, "You're accessing the cors-anywhere from wrong domain, only http://zoff.no is allowed");
|
res.writeHead(401, "You're accessing the cors-anywhere from wrong domain, only http://zoff.no is allowed");
|
||||||
res.end();
|
res.end();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
var cors_headers = withCORS({}, req);
|
var cors_headers = withCORS({}, req);
|
||||||
if (req.method == 'OPTIONS') {
|
if (req.method == 'OPTIONS') {
|
||||||
// Pre-flight request. Reply successfully:
|
// Pre-flight request. Reply successfully:
|
||||||
|
|||||||
2
static/dist/main.min.js
vendored
2
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -158,7 +158,7 @@ var Youtube = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
img.crossOrigin = 'Anonymous';
|
img.crossOrigin = 'Anonymous';
|
||||||
img.src = 'https://zoff.no:8080/http://img.youtube.com/vi/'+id+'/mqdefault.jpg';
|
img.src = 'https://zoff.no:8080/https://img.youtube.com/vi/'+id+'/mqdefault.jpg';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user