Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 696 Bytes

README.md

File metadata and controls

45 lines (27 loc) · 696 Bytes

GORS: A simple way of handling CORS in Traefik

This plugin intercepts requests and processes the OPTIONS requests and returns the desired response.

Features:

  • Supports for disabling or enabling the plugin
  • Ability to config allowed Origin, Headers, Methods and Max-Age

Examples

Allow all origins

AllowedOrigins:
    - "*"

Limit allowed origins

AllowedOrigins:
    - "https://foo.example.com"
    - "https://bar.example.com"

Defaults:

AllowedOrigins: empty list 
AllowedHeaders: empty list
Disabled: true
PreflightMaxAge: 3600
AllowedMethods: empty list

TODO:

  • Ability to use Regex for allowed Origin