Skip to content

Commit

Permalink
0.3.5
Browse files Browse the repository at this point in the history
Fix X-Frame-Options header injection for Firefox 59
  • Loading branch information
msxmine authored Mar 21, 2018
1 parent 940be5c commit 3ac5334
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "Edziennik-plus",
"description": "Więcej funkcji w dzienniku elektronicznym",
"version": "0.3.4",
"version": "0.3.5",
"icons": {"128":"icon.png"},
"author": "MS",
"options_ui": {
Expand Down
14 changes: 7 additions & 7 deletions tlo.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

function zmienNaglowek(req) {
var mojNaglowek = {
name: "X-Frame-Options",
value: "SAMEORIGIN"
};
req.responseHeaders.push(mojNaglowek);
function zmienNaglowek(req) {
for (var i = 0, leng = req.responseHeaders.length; i < leng; i++){
if (req.responseHeaders[i].name == "X-Frame-Options"){
req.responseHeaders[i].value = "SAMEORIGIN";
}
}
return {responseHeaders: req.responseHeaders};
}

browser.webRequest.onHeadersReceived.addListener(
zmienNaglowek,
{urls: ["https://synergia.librus.pl/przegladaj_plan_lekcji"]},
{urls: ["https://synergia.librus.pl/przegladaj_plan_lekcji", "http://synergia.librus.pl/przegladaj_plan_lekcji"]},
["blocking", "responseHeaders"]
);

0 comments on commit 3ac5334

Please sign in to comment.