mirror of
https://github.com/lucky-sideburn/kubeinvaders.git
synced 2026-04-06 18:36:52 +00:00
15 lines
577 B
Lua
15 lines
577 B
Lua
|
|
|
|
ngx.header['Access-Control-Allow-Origin'] = '*'
|
|
ngx.header['Access-Control-Allow-Methods'] = 'GET, POST, OPTIONS'
|
|
ngx.header['Access-Control-Allow-Headers'] = 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'
|
|
ngx.header['Access-Control-Expose-Headers'] = 'Content-Length,Content-Range';
|
|
ngx.req.read_body()
|
|
|
|
local request_body = ngx.req.get_body_data()
|
|
local arg = ngx.req.get_uri_args()
|
|
local namespace = arg['namespace']
|
|
|
|
local handle = io.popen("/opt/kube-linter-parser.sh " .. namespace)
|
|
local result = handle:read("*a")
|
|
ngx.say(result) |