summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9f2cba2)
Looks out for the request HTTP header "cc", if it's set it takes the header
values verbatim and uses them as the value for a "cache-control" response header.
Allows for a dynamic evaluation of a CDN caching configuration.
--- /dev/null
+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