Skip to content

remix/middleware/cop · Interface

View Source

CopOptions

Summary

Configuration for the cross-origin protection middleware.

Signature

interface CopOptions {
  insecureBypassPatterns?: readonly string[]
  onDeny?: CopDenyHandler
  trustedOrigins?: readonly string[]
}

Properties

insecureBypassPatterns

Path patterns that should bypass protection for matching requests.

onDeny

Optional custom response handler for rejected requests.

trustedOrigins

Exact origins that should bypass cross-origin rejection.