Skip to content

[Feature] Add ADD_ALLOWED_PROTOCOLS and ADD_DISALLOWED_PROTOCOLS options for easier URI management #1197

@SweetSea-ButImNotSweet

Description

@SweetSea-ButImNotSweet

Description

Currently, allowing custom URI protocols (such as my-app://, internal://) requires overriding the entire ALLOWED_URI_REGEXP. This is error-prone, hard to maintain, and forces developers to copy-paste a complex internal regex just to add a single schema.

Proposal

I propose adding two new configuration options:

  1. ADD_ALLOWED_PROTOCOLS: An array of strings to be merged into the default allowed list.
  2. ADD_DISALLOWED_PROTOCOLS: A way to explicitly block certain domains or patterns without touching the main regex.

Why?

Not everyone is a Regex expert; a simple mistake like missing a | could block safe protocols and accidentally create dangerous ones (example: merging http and https into a broken httphttps schema), which is a significant security risk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions