X-Git-Url: http://git.sven.stormbind.net/?a=blobdiff_plain;f=nginx%2Fset_cache_control.conf;fp=nginx%2Fset_cache_control.conf;h=a99c1fe36705d75407380d7b06d097b89efc1930;hb=6e299d8972a76bdddc703c58a98c724ff8e67746;hp=0000000000000000000000000000000000000000;hpb=9f2cba27b070a480756edb80d3fc0a76ca7c407f;p=sven%2Fscripts.git diff --git a/nginx/set_cache_control.conf b/nginx/set_cache_control.conf new file mode 100644 index 0000000..a99c1fe --- /dev/null +++ b/nginx/set_cache_control.conf @@ -0,0 +1,12 @@ +location /cc { + default_type 'text/plain'; + content_by_lua_block { + local cc=ngx.req.get_headers()["cc"] + if cc ~= nil then + ngx.header["cache-control"]=cc + ngx.say(cc) + else + ngx.say("moep - no cc header found") + end + } +} \ No newline at end of file