mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-04 03:53:56 +00:00
1a73877305
Currently, this is using a "URI prefix match", but per nginx docs,
```
[...] the location with the longest matching prefix is selected and remembered. Then regular expressions are checked, in the order of their appearance in the configuration file. The search of regular expressions terminates on the first match, and the corresponding configuration is used. If no match with a regular expression is found then the configuration of the prefix location remembered earlier is used.
```
which means a config like this (from wordpress service) will override that
```
locations = {
"~ /\\." = {
priority = 800;
extraConfig = "deny all;";
};
};
```
😱
Luckily, from nginx docs:
```
If the longest matching prefix location has the “^~” modifier then regular expressions are not checked.
```
Whew!
|
||
---|---|---|
.. | ||
default.nix | ||
gitweb.nix | ||
location-options.nix | ||
vhost-options.nix |