This commit is contained in:
Markus Heiser 2023-09-23 12:27:14 +02:00 committed by GitHub
commit ac631cc1a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -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') %}
<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>
@ -82,5 +79,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>

View File

@ -613,10 +613,10 @@ 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')
return Response('<svg></svg>', mimetype='image/svg+xml')
@app.route('/search', methods=['GET', 'POST'])