Ky sajt do të funksionojë me kufizime, teksa bëjmë mirëmbajtjen e tij për të përmirësuar punën tuaj. Nëse një artikull nuk e zgjidh problemin tuaj dhe dëshironi të bëni një pyetje, kemi bashkësinë tonë të asistencës, e gatshme për t’ju ndihmuar, te @FirefoxSupport në Twitter dhe/r/firefox në Reddit.

Kërkoni te Asistenca

Shmangni karremëzime gjoja asistence. S’do t’ju kërkojmë kurrë të bëni një thirrje apo të dërgoni tekst te një numër telefoni, apo të na jepni të dhëna personale. Ju lutemi, raportoni veprimtari të dyshimtë duke përdorur mundësinë “Raportoni Abuzim”.

Mësoni Më Tepër

policies.json WebsiteFilter does not block website properly

more options

Suppose I have a "policies.json" file in the "distribution" subdirectory of my Firefox installation.

And suppose "policies.json" file contains this:

{

 "policies": {
     "WebsiteFilter": {
         "Block": [
           "youtube.com",
           "www.youtube.com",
           "http://www.youtube.com",
           "https://www.youtube.com",
         ]
     }
 }

}


Now if I type "youtube.com" in the address bar, it shows "Your organisation has blocked access to this page or web site." It means firefox blocks "youtube.com" correctly. Meanwhile the url in the address bar is "https://www.youtube.com/."

But if I remove "https://www." from "https://www.youtube.com/" in the address bar (Not retype), I can actually visit "youtube.com." It means somehow the webfilter is not working properly.

This issue exists in ubuntu and macos with version 92.0(64-bit).

Does anyone have the same problem? Any help would be appreciated.

Suppose I have a "policies.json" file in the "distribution" subdirectory of my Firefox installation. And suppose "policies.json" file contains this: { "policies": { "WebsiteFilter": { "Block": [ "youtube.com", "www.youtube.com", "http://www.youtube.com", "https://www.youtube.com", ] } } } Now if I type "youtube.com" in the address bar, it shows "Your organisation has blocked access to this page or web site." It means firefox blocks "youtube.com" correctly. Meanwhile the url in the address bar is "https://www.youtube.com/." But if I remove "https://www." from "https://www.youtube.com/" in the address bar (Not retype), I can actually visit "youtube.com." It means somehow the webfilter is not working properly. This issue exists in ubuntu and macos with version 92.0(64-bit). Does anyone have the same problem? Any help would be appreciated.

Zgjidhje e zgjedhur

The Policies page (https://github.com/mozilla/policy-templates#websitefilter) refers to the following page for the format of the URL match patterns:

https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/Match_patterns

It looks like you need all three parts (scheme, host, path). The * character matches both http and https, and any path, so try:

{
  "policies": {
      "WebsiteFilter": {
          "Block": [
            "*://youtube.com/*",
            "*://www.youtube.com/*"
          ]
      }
  }
}


Does that work on yours?

Lexojeni këtë përgjigje brenda kontekstit 👍 1

Krejt Përgjigjet (3)

more options

Zgjidhja e Zgjedhur

The Policies page (https://github.com/mozilla/policy-templates#websitefilter) refers to the following page for the format of the URL match patterns:

https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/Match_patterns

It looks like you need all three parts (scheme, host, path). The * character matches both http and https, and any path, so try:

{
  "policies": {
      "WebsiteFilter": {
          "Block": [
            "*://youtube.com/*",
            "*://www.youtube.com/*"
          ]
      }
  }
}


Does that work on yours?

more options

It works. Thank you very much for your help.

PS: Reboot may be required for the updated policies to take effect.

more options

Before rebooting, you also could try the special "Clear Startup Cache" restart button on the right side of the Troubleshooting Information page. That sometimes is needed if startup configuration isn't working correctly.

More info: Use the Troubleshooting Information page to help fix Firefox issues