mirror of https://github.com/zulip/zulip.git
ef188af82d
Directives in `location` blocks may or may not inherit from surrounding `location` blocks; specifically, `add_header` directives do not[1]: > There could be several add_header directives. These directives are > inherited from the previous configuration level if and only if there > are no add_header directives defined on the current level. In order to maintain the same headers (including, critically, `Access-Control-Allow-Origin`) as the surrounding block, all `add_header` directives must thus be repeated (which includes the `include`). For clarity, un-nest and repeat the entire `location` block as was used for `/static/`, but with the additional `add_header`. This is preferred to the of an `if $request_uri` statement to add the header, as those can have unexpected or undefined results[2]. [1] http://nginx.org/en/docs/http/ngx_http_headers_module.html#add_header [2] https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/ |
||
---|---|---|
.. | ||
zulip | ||
zulip_ops |