Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mynij
slapos-mynij-dev
Commits
8922da13
Commit
8922da13
authored
May 14, 2018
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: Implement type:redirect
parent
5ee75f56
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
software/caddy-frontend/buildout.hash.cfg
software/caddy-frontend/buildout.hash.cfg
+1
-1
software/caddy-frontend/templates/default-virtualhost.conf.in
...ware/caddy-frontend/templates/default-virtualhost.conf.in
+8
-4
No files found.
software/caddy-frontend/buildout.hash.cfg
View file @
8922da13
...
@@ -50,7 +50,7 @@ md5sum = f20d6c3d2d94fb685f8d26dfca1e822b
...
@@ -50,7 +50,7 @@ md5sum = f20d6c3d2d94fb685f8d26dfca1e822b
[template-default-slave-virtualhost]
[template-default-slave-virtualhost]
filename = templates/default-virtualhost.conf.in
filename = templates/default-virtualhost.conf.in
md5sum =
8ebca8b912cc2a498084b0694d035470
md5sum =
3913387908485adc07b1cd89ad899cd5
[template-cached-slave-virtualhost]
[template-cached-slave-virtualhost]
filename = templates/cached-virtualhost.conf.in
filename = templates/cached-virtualhost.conf.in
...
...
software/caddy-frontend/templates/default-virtualhost.conf.in
View file @
8922da13
...
@@ -80,8 +80,10 @@
...
@@ -80,8 +80,10 @@
regexp (.*)
regexp (.*)
to /VirtualHostBase/{scheme}%2F%2F{hostonly}:{{ slave_parameter.get('virtualhostroot-https-port', '443') }}%2F{{ slave_parameter.get('path', '') }}%2FVirtualHostRoot/{1}
to /VirtualHostBase/{scheme}%2F%2F{hostonly}:{{ slave_parameter.get('virtualhostroot-https-port', '443') }}%2F{{ slave_parameter.get('path', '') }}%2FVirtualHostRoot/{1}
}
}
{% elif slave_type == 'redirect' -%}
{% elif slave_type == 'redirect' and backend_url %}
# TODO-Caddy RewriteRule (.*) {{ slave_parameter.get('https-url', slave_parameter.get('url', ''))}}$1 [R,L]
redir 302 {
/ {{ backend_url }}{uri}
}
{% else -%}
{% else -%}
{% if 'default-path' in slave_parameter %}
{% if 'default-path' in slave_parameter %}
redir 301 {
redir 301 {
...
@@ -148,8 +150,10 @@
...
@@ -148,8 +150,10 @@
{%- if https_only %}
{%- if https_only %}
redir / https://{host}{uri}
redir / https://{host}{uri}
{% elif slave_type == 'redirect' -%}
{% elif slave_type == 'redirect' and slave_parameter.get('url', '') %}
# TODO-Caddy RewriteRule (.*) {{slave_parameter.get('url', '')}}$1 [R,L]
redir 302 {
/ {{ slave_parameter.get('url', '') }}{uri}
}
{% elif slave_type == 'zope' and backend_url %}
{% elif slave_type == 'zope' and backend_url %}
proxy / {{ backend_url }} {
proxy / {{ backend_url }} {
transparent
transparent
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment