Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Learn More

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

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.

Gekozen oplossing

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?

Dit antwoord in context lezen 👍 1

Alle antwoorden (3)

more options

Gekozen oplossing

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