We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f5829d commit e7b5a19Copy full SHA for e7b5a19
1 file changed
frameworks/nginx-openresty/nginx.conf
@@ -35,6 +35,17 @@ http {
35
server {
36
listen 8080 reuseport;
37
38
+ # Reject unknown HTTP methods — only allow GET, HEAD, POST
39
+ access_by_lua_block {
40
+ local m = ngx.req.get_method()
41
+ if m ~= "GET" and m ~= "HEAD" and m ~= "POST" then
42
+ ngx.status = 405
43
+ ngx.header["Content-Type"] = "text/plain"
44
+ ngx.say("Method Not Allowed")
45
+ return ngx.exit(405)
46
+ end
47
+ }
48
+
49
location /pipeline { content_by_lua_block { require("handler").pipeline() } }
50
location /baseline11 { content_by_lua_block { require("handler").baseline11() } }
51
location /baseline2 { content_by_lua_block { require("handler").baseline2() } }
0 commit comments