Skip to content

Commit

Permalink
Add warnings and FAQ for the DNR type
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibanami committed Aug 2, 2024
1 parent d0e029c commit e754490
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
Binary file not shown.
12 changes: 12 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ Since we don't collect your personal information as per **[the privacy policy](.

But it’s not required. You can only allow it on specific websites. 👌

## Why does this extension require a new permission? :id=permission-alert-on-safari

You may see this alert on Safari after updating Redirect Web:

![An alert of disabling the app](assets/safari-additional-permission-alert.webp)

> "Redirect Web for Safari" has been updated and is requesting additional permissions. To protect your privacy, this extension has been turned off.
>
> You can turn this extension on in the Extensions section of Safari Settings.
This is due to the [declarativeNetRequestWithHostAccess](https://developer.apple.com/documentation/safariservices/safari_web_extensions/blocking_content_with_your_safari_web_extension) permission required by the [DNR](./redirect-rule#type) type introduced in version 7. Please re-enable the extension. Sorry for the inconvenience.

## Will the library's contents become paid in the future?

No, it's always free. You can also find the source of all the contents [here](https://github.com/mshibanami/redirect-web/tree/main/docs/library).
Expand Down
11 changes: 6 additions & 5 deletions docs/redirect-rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ Specify the **Type** option to control how the app handles redirection. You can

* **Original** (Default)
* This uses traditional Web APIs to control redirection. Additionally, it uses [the Tabs API](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs) for a fallback.
* You can use all the options other than [Resource Types](#resource-types) and [Request Methods](#request-methods) in [Redirect From](#redirect-from).
* You can use all the options other than [Resource Types](#resource-types) and [Request Methods](#request-methods).
* This is slower than the *Declarative* type and may cause extra network requests.
* **DNR** (Experimental):
* This uses the [Declarative Net Request](https://developer.apple.com/documentation/safariservices/safari_web_extensions/blocking_content_with_your_safari_web_extension) (DNR) API to handle redirection.
* This allows you to specify [Resource Types](#resource-types) ~~and [Request Methods](#request-methods)~~ in [Redirect From](#redirect-from).
* You can't use some options, such as [Capturing Group Processing](#capturing-group-processing) and [Excluded URL Patterns](#excluded-url-patterns).
* Currently, you can't include pipes (`|`) in your Regular Expression pattern. [Details](https://github.com/mshibanami/redirect-web/issues/44)
* Since the DNR API still has some issues, we consider that is still an experimental feature. You can find the list of all the known issues [here](https://github.com/mshibanami/redirect-web/labels/DNR).
* This type works much faster than the Original type because it doesn't initiate a network request for the source URL.
* ⚠️ If you update Redirect Web to version 7 or later, you may see an alert on Safari that disables the extension due to a new permission request. [Details](./faq#permission-alert-on-safari)
* ⚠️ You can't use some options, such as [Capturing Group Processing](#capturing-group-processing) and [Excluded URL Patterns](#excluded-url-patterns).
* ⚠️ Currently, you can't include pipes (`|`) in your Regular Expression pattern. [Details](https://github.com/mshibanami/redirect-web/issues/44)
* ⚠️ Since the DNR API still has some issues, we consider that is still an experimental feature. You can find the list of all the known issues [here](https://github.com/mshibanami/redirect-web/labels/DNR).

### Redirect From

Expand Down

0 comments on commit e754490

Please sign in to comment.