I wrote an equivalent of what you've written, but instead of requests.get, I used urllib.request.openurl and didn't have the issue you're facing.
from flask import Flask, request
from six.moves import urllib
app = Flask(__name__)
@app.route('/background_process')
def background_process():
try:
address = request.args.get("textAddress")
resp = urllib.request.urlopen("http://"+address)
return resp.read()
except Exception as e:
return(str(e))