Skip to content

parseAllowedHosts keeps scheme/port so allowlist entries never match #6

Description

@royalpinto007

Problem

parseAllowedHosts keeps scheme/port, so a documented-style entry like https://seller.example.com never equals the request hostname and all legit traffic fail-closes with a bare allowlist error.

Where

src/guard.ts (trim + lowercase only, no URL parsing).

Acceptance

Add a failing test first asserting parseAllowedHosts("https://seller.example.com:443/") equals ["seller.example.com"]. Then fix.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions