Skip to content
Snippets Groups Projects
Commit 784b8957 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

...

parent 5f5b094f
No related merge requests found
......@@ -38,7 +38,3 @@ systemctl status webapps-deliverer.service
EOF
exit
exit
......@@ -48,7 +48,7 @@ def lib(fn):
The following works like a proxy server:
A flask server URL of the form
"http://127.0.0.1:5000/5984/vl_db/000_SERVERS"
"http://127.0.0.1:8081/5984/vl_db/000_SERVERS"
will be forwarded to the real CouchDB URL
"http://127.0.0.1:5984/vl_db/000_SERVERS"
......@@ -58,7 +58,7 @@ https://stackoverflow.com/questions/6656363/proxying-to-another-web-service-with
@app.route('/{}/'.format(COUCHDB_PORT), \
methods=['GET','PUT','POST','HEAD','DELETE','OPTIONS'])
@app.route('/{}/<path:p>'.format(COUCHDB_PORT),
methods=['GET','PUSH','POST','DELETE'])
methods=['GET','PUT','POST','HEAD','DELETE','OPTIONS'])
def couchdb_proxy(p=''):
q = request.query_string.decode();
if q:
......@@ -84,6 +84,6 @@ def couchdb_proxy(p=''):
return response
if __name__ == '__main__':
app.config["ENV"] = FLASK_ENV
app.config["DEBUG"] = FLASK_DEBUG
app.config['ENV'] = FLASK_ENV
app.config['DEBUG'] = FLASK_DEBUG
app.run(host='0.0.0.0', port=FLASK_RUN_PORT)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment