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

...

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