src/happyx/ssr/cors

Search:
Group by:

Provides working with Cross-Origin Resource Sharing (CORS) ✨

Example

regCORS:
  origins: ["https://google.com", "http://localhost:5000"]
  methods: ["GET", "POST"]
  headers: ["*"]
  credentials: true

Types

CORSObj = object
  allowCredentials*: bool
  allowHeaders*: string
  allowOrigins*: seq[string]
  allowMethods*: string

Macros

macro addCORSHeaders(headers: HttpHeaders)
macro regCORS(body: untyped): untyped
Register CORS