Handles CORS (Cross-Origin Resource Sharing) headers for browser-based testing.
Allows requests from any origin with commonly needed headers and methods.
Usage
# In router
plug PaperTiger.Plugs.CORSHeaders Added
Access-Control-Allow-Origin: *Access-Control-Allow-Methods: GET, POST, DELETE, OPTIONSAccess-Control-Allow-Headers: Authorization, Content-Type, Idempotency-KeyAccess-Control-Max-Age: 86400(24 hours)
Preflight Requests
Handles OPTIONS requests for CORS preflight by responding with 200 OK.