]> git.sven.stormbind.net Git - sven/scripts.git/commitdiff
Merge branch 'master' of ssh://git.sven.stormbind.net/var/lib/git/sven/scripts
authorSven Hoexter <sven@stormbind.net>
Tue, 17 Sep 2019 20:43:06 +0000 (22:43 +0200)
committerSven Hoexter <sven@stormbind.net>
Tue, 17 Sep 2019 20:43:06 +0000 (22:43 +0200)
nginx/set_status_code.conf [new file with mode: 0644]

diff --git a/nginx/set_status_code.conf b/nginx/set_status_code.conf
new file mode 100644 (file)
index 0000000..4dadbab
--- /dev/null
@@ -0,0 +1,8 @@
+location ~ ^/sc/([0-9]+) {
+ default_type 'text/plain';
+ set $sc $1;
+  content_by_lua_block {
+   ngx.status=ngx.var.sc
+   ngx.say("Status code requested: ", ngx.var.sc)
+  }
+}
\ No newline at end of file