Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Learn More

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

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.

Keazen 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 antwurd yn kontekst lêze 👍 1

Alle antwurden (3)

more options

Keazen 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