Update searx to include limiter unstead of filtron #32
Loading…
Reference in a new issue
No description provided.
Delete branch "searx_redis"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -14,0 +18,4 @@
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /{{ searx_app_dir }};
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8888/;
Weouldn't it make more sense to use variables to define the upstream just like we do for proxy template?
like
proxy_pass {{ item.upstream_proto }}://{{ item.upstream_name }}:{{ item.upstream_port }};
? It would make it cleaner and we have the logic for it already.Just did a commit, is that ok with you @muppeth ?
@ -14,0 +15,4 @@
{% if item.limiter == 'true' %}
proxy_set_header Connection $http_connection;
proxy_set_header X-Script-Name {{ searx_app_dir }};
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Those you can add to headers above without the need to specify item.limiter.
@ -14,0 +10,4 @@
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
{% if searx_limiter == 'true' or searx_filtron == 'true' %}
proxy_pass {{ item.upstream_proto }}://{{ item.upstream_name }}:{{ item.upstream_port }};
no need for the if here. whether you use limiter, filtron or non of those, you just fill in the unstream_nme, proto and port accordingly.
but here https://searx.github.io/searx/admin/installation-nginx.html#the-nginx-http-server it seems to me that
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
is set on searx only when filtron is not set and with noproxy_pass
And here: https://docs.searxng.org/admin/installation-nginx.html for searxng, it is
https://docs.searxng.org/admin/installation-nginx.html
that is set without theproxy_pass
So, should
proxy_pass
be set in all case (so removing the if case)?