Skip to content

Configurable scheme allow-list #771

Description

@romain-pm

Part of #749. The scheme allow-list is hardcoded to http, https, mailto, tel, ftp.

Jahia/jahia.com's partner website field is deliberately ^https?:// only, so the adoption kept the userland regex on top of the library check — the library is a floor it cannot raise.

  • allowedSchemes?: readonly string[], per call and module-wide.
  • Precedent on the image side and in Next.js: qualities, localPatterns and remotePatterns are all configurable allow-lists rather than fixed ones.
  • Keep the default as it is. This is about narrowing, not widening — a project should be able to be stricter than the library without duplicating the check.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featA new feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions