Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Improve searx image proxy ? #934

Open
dalf opened this issue Jun 2, 2017 · 1 comment
Open

Improve searx image proxy ? #934

dalf opened this issue Jun 2, 2017 · 1 comment

Comments

@dalf
Copy link
Contributor

dalf commented Jun 2, 2017

Privacy :

  • Remove the If-Modified-Since and If-None-Match sent headers.
  • Remove the Last-Modified, Expires, Etag received headers.

Ressource usage improvement:

@dalf
Copy link
Contributor Author

dalf commented Jul 14, 2019

The snippets doesn't exist anymore, see : https://gist.github.com/fanzeyi/7490019

# -*- coding: utf-8 -*-

from flask import Flask
from flask import Response
from flask import stream_with_context

import requests

app = Flask(__name__)

@app.route('/<path:url>')
def home(url):
    req = requests.get(url, stream = True)
    return Response(stream_with_context(req.iter_content(chunk_size=1024)), content_type = req.headers['content-type'])

if __name__ == '__main__':
    app.run()

@dalf dalf mentioned this issue Oct 20, 2019
5 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant