|
| 1 | +--- |
| 2 | +title: "SitePolicies" |
| 3 | +description: "Fine grained control over policies for specific sites." |
| 4 | +category: "Browsing restrictions" |
| 5 | +--- |
| 6 | + |
| 7 | +Defines policies scoped to specific sites. |
| 8 | + |
| 9 | +**Compatibility:** Firefox 150, Firefox ESR 153\ |
| 10 | +**Preferences Affected:** N/A |
| 11 | + |
| 12 | +The policy is made up of a list of rules that are evaluated in order. Each can contain: |
| 13 | + |
| 14 | +- `Match` which is a list of sites. An empty list or missing property means to match all sites. |
| 15 | +- `Exceptions` is also a list of sites which when matched bypasses this set of rules. |
| 16 | +- `Policies` is an object defining the policies. |
| 17 | + |
| 18 | +Currently the only supported policies are: |
| 19 | + |
| 20 | +- `DisableJit` which when true disables the JIT engine for the site. |
| 21 | + |
| 22 | +It is important to note that a site here refers to a registerable domain so `*.example.com` is a valid site but `*.com` is not. `*` can also be used to refer to all sites. |
| 23 | + |
| 24 | +For example this setting would disable the JIT for only `*.example.com`: |
| 25 | + |
| 26 | +```json |
| 27 | +[ |
| 28 | + { |
| 29 | + "Match": ["*.example.com"], |
| 30 | + "Policies": { |
| 31 | + "DisableJit": true |
| 32 | + } |
| 33 | + } |
| 34 | +] |
| 35 | +``` |
| 36 | + |
| 37 | +While this setting would disable the JIT on every site except `*.example.org`: |
| 38 | + |
| 39 | +```json |
| 40 | +[ |
| 41 | + { |
| 42 | + "Exceptions": ["*.example.org"], |
| 43 | + "Policies": { |
| 44 | + "DisableJit": true |
| 45 | + } |
| 46 | + } |
| 47 | +] |
| 48 | +``` |
| 49 | + |
| 50 | +## Windows (GPO) |
| 51 | + |
| 52 | +``` |
| 53 | +Software\Policies\Mozilla\Firefox\SitePolicies (REG_MULTI_SZ) = |
| 54 | +[ |
| 55 | + { |
| 56 | + "Exceptions": ["*.example.com"], |
| 57 | + "Policies": { |
| 58 | + "DisableJit": true |
| 59 | + }, |
| 60 | + } |
| 61 | +] |
| 62 | +``` |
| 63 | + |
| 64 | +## Windows (Intune) |
| 65 | + |
| 66 | +OMA-URI: |
| 67 | + |
| 68 | +```url |
| 69 | +./Device/Vendor/MSFT/Policy/Config/Firefox~Policy~firefox/SitePolicies |
| 70 | +``` |
| 71 | + |
| 72 | +Value (string): |
| 73 | + |
| 74 | +```xml |
| 75 | +<enabled/> |
| 76 | +<data id="JSON" value='[ |
| 77 | + { |
| 78 | + "Exceptions": ["*.example.com"], |
| 79 | + "Policies": { |
| 80 | + "DisableJit": true |
| 81 | + }, |
| 82 | + } |
| 83 | +]'/> |
| 84 | +``` |
| 85 | + |
| 86 | +## macOS |
| 87 | + |
| 88 | +```xml |
| 89 | +<dict> |
| 90 | + <key>SitePolicies</key> |
| 91 | + <array> |
| 92 | + <dict> |
| 93 | + <key>Exceptions</key> |
| 94 | + <array> |
| 95 | + <string>*.example.com</string> |
| 96 | + </array> |
| 97 | + <key>Policies</key> |
| 98 | + <dict> |
| 99 | + <key>DisableJit</key> |
| 100 | + <true/> |
| 101 | + </dict> |
| 102 | + </dict> |
| 103 | + </array> |
| 104 | +</dict> |
| 105 | +``` |
| 106 | + |
| 107 | +## policies.json |
| 108 | + |
| 109 | +```json |
| 110 | +{ |
| 111 | + "policies": { |
| 112 | + "SitePolicies": [ |
| 113 | + { |
| 114 | + "Exceptions": ["*.example.com"], |
| 115 | + "Policies": { |
| 116 | + "DisableJit": true |
| 117 | + } |
| 118 | + } |
| 119 | + ] |
| 120 | + } |
| 121 | +} |
| 122 | +``` |
0 commit comments