Skip to content

Commit 1362f02

Browse files
authored
feat: add a configuration option to open the endpoint /uuid to other … (backport #136) (#185)
This is an automatic backport of pull request #136 done by [Mergify](https://mergify.io). Cherry-pick of 9d71702 has failed: ``` On branch mergify/bp/release_0.8/pr-136 Your branch is up to date with 'origin/release_0.8'. You are currently cherry-picking commit 9d71702. (fix conflicts and run "git cherry-pick --continue") (use "git cherry-pick --skip" to skip this patch) (use "git cherry-pick --abort" to cancel the cherry-pick operation) Changes to be committed: modified: config/nginx.conf Unmerged paths: (use "git add/rm <file>..." as appropriate to mark resolution) deleted by us: config/config.ini.custom ``` To fix up this pull request, you can check it out locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/ --- <details> <summary>Mergify commands and options</summary> <br /> More conditions and actions can be found in the [documentation](https://docs.mergify.io/). You can also trigger Mergify actions by commenting on this pull request: - `@Mergifyio refresh` will re-evaluate the rules - `@Mergifyio rebase` will rebase this PR on its base branch - `@Mergifyio update` will merge the base branch into this PR - `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch Additionally, on Mergify [dashboard](https://dashboard.mergify.io/) you can: - look at your merge queues - generate the Mergify configuration with the config editor. Finally, you can contact us on https://mergify.io/ </details>
1 parent 8ae25b1 commit 1362f02

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

config/config.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ storage_min_delete_depth=0
151151
# (see http://nginx.org/en/docs/http/ngx_http_autoindex_module.html)
152152
storage_autoindex=1
153153

154+
# extra networks allowed on /uuid endpoint (in addition to 127.0.0.1/32)
155+
# (coma separated list)
156+
# ("null" => no extra uuid allowed)
157+
# example :
158+
# uuid_endpoint_extra_allows=5.6.0.0/16,1.2.3.4/32
159+
uuid_endpoint_extra_allows=null
160+
154161

155162
#######################
156163
##### AUTORESTART #####

config/nginx.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ http {
4040
# FIXME: rename this in __uuid
4141
location = /uuid {
4242
allow 127.0.0.1/32;
43+
{% if MFBASE_NGINX_UUID_ENDPOINT_EXTRA_ALLOWS != "null" -%}
44+
{% for ALLOW in MFBASE_NGINX_UUID_ENDPOINT_EXTRA_ALLOWS.split(',') %}
45+
{%- if ALLOW != "" -%}
46+
allow {{ALLOW}};
47+
{% endif %}
48+
{%- endfor -%}
49+
{%- endif -%}
4350
deny all;
4451
echo "{{UUID}}";
4552
access_log off;

0 commit comments

Comments
 (0)