Welcome to mirror list, hosted at ThFree Co, Russian Federation.

multiline_quotes.conf « etc_nginx « testdata « tests « certbot_nginx « certbot-nginx - github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 74cd84bcd9b73abc3c647f1fcf2520e0c9dff176 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Test nginx configuration file with multiline quoted strings.
# Good example of usage for multilined quoted values is when
# using Openresty's Lua directives and you wish to keep the
# inline Lua code readable.
http {
  server {
      listen *:443; # because there should be no other port open.

      location / {
        body_filter_by_lua 'ngx.ctx.buffered = (ngx.ctx.buffered or "") .. string.sub(ngx.arg[1], 1, 1000)
                            if ngx.arg[2] then
                              ngx.var.resp_body = ngx.ctx.buffered
                            end';
      }
  }
}