Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Webapps Deliverer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vaclab
Webapps Deliverer
Commits
bc47234f
Commit
bc47234f
authored
4 years ago
by
Rolf Niepraschk
Browse files
Options
Downloads
Patches
Plain Diff
"/", "/index.html", and and some little things
parent
e12a5904
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+15
-2
15 additions, 2 deletions
README.md
server.py
+15
-1
15 additions, 1 deletion
server.py
webapps-deliverer.service
+1
-1
1 addition, 1 deletion
webapps-deliverer.service
with
31 additions
and
4 deletions
README.md
+
15
−
2
View file @
bc47234f
# Webapps Deliverer
Flask based web server for delivering file contents of the vaclab web applications.
Flask based web server for delivering file contents of the vaclab web
applications. A proxy is also offered:
A URL of the form
```
http://127.0.0.1:8081/xxxx/vl_db/000_SERVERS
```
will be forwarded to the real CouchDB URL
```
http://127.0.0.1:xxxx/vl_db/000_SERVERS
```
## Installation of the server
...
...
@@ -19,7 +32,7 @@ then activates and starts the systemd process.
## Installation of the data files
The target
i
s this directory structure:
The target
ha
s this directory structure:
```
/srv/www/data/
...
...
This diff is collapsed.
Click to expand it.
server.py
+
15
−
1
View file @
bc47234f
...
...
@@ -52,7 +52,7 @@ def couchdb_proxy(real_port, p=''):
q
=
request
.
query_string
.
decode
();
path
=
p
if
q
:
path
=
p
+
'
?
'
+
q
path
=
p
ath
+
'
?
'
+
q
host
=
urlparse
(
request
.
base_url
).
hostname
scheme
=
urlparse
(
request
.
base_url
).
scheme
new_url
=
'
{}://{}:{}/{}
'
.
format
(
scheme
,
host
,
real_port
,
path
)
...
...
@@ -72,6 +72,20 @@ def couchdb_proxy(real_port, p=''):
response
=
Response
(
resp
.
content
,
resp
.
status_code
,
headers
)
return
response
@app.route
(
'
/
'
)
@app.route
(
'
/index.html
'
)
def
home
():
return
'''
<!DOCTYPE html>
<html lang=
"
en
"
>
<head>
<meta charset=
"
UTF-8
"
>
<title>Webapps Deliverer</title>
</head>
<body>
<h3>VacLab: Combined web and CouchDB proxy service</h3>Version: {}
</body>
</html>
'''
.
format
(
VERSION
)
@app.route
(
'
/version
'
)
def
version
():
return
VERSION
+
'
\n
'
...
...
This diff is collapsed.
Click to expand it.
webapps-deliverer.service
+
1
−
1
View file @
bc47234f
...
...
@@ -6,7 +6,7 @@ After=network.target
User
=
nobody
Environment
=
FLASK_PORT=8081
Environment
=
DATA_PATH=/srv/www/data/
Environment
=
FLASK_ENV=
production
Environment
=
FLASK_ENV=
development
Environment
=
FLASK_DEBUG=1
Type
=
simple
StandardOutput
=
null
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment