Merge d4456faed2
into a1e2b25467
This commit is contained in:
commit
2ec7210272
@ -175,3 +175,4 @@ features or generally made searx better:
|
|||||||
- Daniel Kukula `<https://github.com/dkuku>`
|
- Daniel Kukula `<https://github.com/dkuku>`
|
||||||
- Patrick Evans `https://github.com/holysoles`
|
- Patrick Evans `https://github.com/holysoles`
|
||||||
- Daniel Mowitz `<https://daniel.mowitz.rocks>`
|
- Daniel Mowitz `<https://daniel.mowitz.rocks>`
|
||||||
|
- `Bearz314 <https://github.com/bearz314>`_
|
||||||
|
@ -123,7 +123,9 @@ def filter_request(
|
|||||||
)
|
)
|
||||||
if c > SUSPICIOUS_IP_MAX:
|
if c > SUSPICIOUS_IP_MAX:
|
||||||
logger.error("BLOCK: too many request from %s in SUSPICIOUS_IP_WINDOW (redirect to /)", network)
|
logger.error("BLOCK: too many request from %s in SUSPICIOUS_IP_WINDOW (redirect to /)", network)
|
||||||
return flask.redirect(flask.url_for('index'), code=302)
|
response = flask.redirect(flask.url_for('index'), code=302)
|
||||||
|
response.headers["Cache-Control"] = "no-store, max-age=0"
|
||||||
|
return response
|
||||||
|
|
||||||
c = incr_sliding_window(redis_client, 'ip_limit.BURST_WINDOW' + network.compressed, BURST_WINDOW)
|
c = incr_sliding_window(redis_client, 'ip_limit.BURST_WINDOW' + network.compressed, BURST_WINDOW)
|
||||||
if c > BURST_MAX_SUSPICIOUS:
|
if c > BURST_MAX_SUSPICIOUS:
|
||||||
|
@ -594,7 +594,7 @@ def health():
|
|||||||
@app.route('/client<token>.css', methods=['GET', 'POST'])
|
@app.route('/client<token>.css', methods=['GET', 'POST'])
|
||||||
def client_token(token=None):
|
def client_token(token=None):
|
||||||
link_token.ping(sxng_request, token)
|
link_token.ping(sxng_request, token)
|
||||||
return Response('', mimetype='text/css')
|
return Response('', mimetype='text/css', headers={"Cache-Control": "no-store, max-age=0"})
|
||||||
|
|
||||||
|
|
||||||
@app.route('/rss.xsl', methods=['GET', 'POST'])
|
@app.route('/rss.xsl', methods=['GET', 'POST'])
|
||||||
|
Loading…
Reference in New Issue
Block a user