mirror of https://github.com/searxng/searxng.git
Merge 08ef986e58
into b07c0ae39f
This commit is contained in:
commit
07fff4e195
|
@ -17,9 +17,6 @@
|
|||
{% else %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/searxng.min.css') }}" type="text/css" media="screen">
|
||||
{% endif %}
|
||||
{% if get_setting('server.limiter') or get_setting('server.public_instance') %}
|
||||
<link rel="stylesheet" href="{{ url_for('client_token', token=link_token) }}" type="text/css">
|
||||
{% endif %}
|
||||
{% block styles %}{% endblock %}
|
||||
<!--[if gte IE 9]>-->
|
||||
<script src="{{ url_for('static', filename='js/searxng.head.min.js') }}" client_settings="{{ client_settings }}"></script>
|
||||
|
@ -86,5 +83,8 @@
|
|||
<!--[if gte IE 9]>-->
|
||||
<script src="{{ url_for('static', filename='js/searxng.min.js') }}"></script>
|
||||
<!--<![endif]-->
|
||||
{%- if get_setting('server.limiter') -%}
|
||||
<img class='invisible' src="{{ url_for('client_token', token=link_token) }}">
|
||||
{%- endif -%}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -617,10 +617,12 @@ def health():
|
|||
return Response('OK', mimetype='text/plain')
|
||||
|
||||
|
||||
@app.route('/client<token>.css', methods=['GET', 'POST'])
|
||||
@app.route('/client<token>.svg', methods=['GET', 'POST'])
|
||||
def client_token(token=None):
|
||||
link_token.ping(request, token)
|
||||
return Response('', mimetype='text/css')
|
||||
resp = Response('<svg></svg>', mimetype='image/svg+xml')
|
||||
resp.headers['Cache-Control'] = 'no-store'
|
||||
return resp
|
||||
|
||||
|
||||
@app.route('/search', methods=['GET', 'POST'])
|
||||
|
|
Loading…
Reference in New Issue