34 lines
743 B
YAML
34 lines
743 B
YAML
plugin_configs:
|
|
- id: 1
|
|
plugins:
|
|
serverless-pre-function:
|
|
phase: access
|
|
functions:
|
|
- |
|
|
local f = assert(loadfile("/usr/local/apisix/auth.lua"))
|
|
local mod = f()
|
|
return mod.access
|
|
routes:
|
|
- id: bff
|
|
name: bff
|
|
priority: 10
|
|
uris:
|
|
- /admin/*
|
|
- /api/*
|
|
methods:
|
|
- GET
|
|
- POST
|
|
- PUT
|
|
- OPTIONS
|
|
plugin_config_id: 1
|
|
plugins:
|
|
cors:
|
|
allow_origins: "*"
|
|
allow_methods: "GET,POST,PUT,OPTIONS"
|
|
allow_headers: "Authorization,Authorization-Type,Authorization-Auth,Refresh,X-Refresh,X-Service-Code"
|
|
max_age: 86400
|
|
upstream:
|
|
type: roundrobin
|
|
nodes:
|
|
"bff:10000": 1
|
|
#END |