Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos-caddy
Commits
3749d64e
Commit
3749d64e
authored
May 14, 2018
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: Implement type:redirect
parent
0cde3291
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
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
+6
-2
No files found.
software/caddy-frontend/buildout.hash.cfg
View file @
3749d64e
...
...
@@ -55,7 +55,7 @@ md5sum = 4dbb8560e4de1af2a0706b020e713fe7
[template-default-slave-virtualhost]
filename = templates/default-virtualhost.conf.in
md5sum =
95df69224d6f6554a674f5e3efebaa8f
md5sum =
ae1f697a837ea31524278b35af74a823
[template-cached-slave-virtualhost]
filename = templates/cached-virtualhost.conf.in
...
...
software/caddy-frontend/templates/default-virtualhost.conf.in
View file @
3749d64e
...
...
@@ -80,7 +80,9 @@
to /VirtualHostBase/{scheme}%2F%2F{hostonly}:{{ slave_parameter.get('virtualhostroot-https-port', '443') }}%2F{{ slave_parameter.get('path', '') }}%2FVirtualHostRoot/{1}
}
{% elif slave_type == 'redirect' -%}
# TODO-Caddy RewriteRule (.*) {{ slave_parameter.get('https-url', slave_parameter.get('url', ''))}}$1 [R,L]
redir 302 {
/ {{ slave_parameter.get('https-url', slave_parameter.get('url', ''))}}{uri}
}
{% else -%}
{% if 'default-path' in slave_parameter %}
redir 301 {
...
...
@@ -145,7 +147,9 @@
{%- if https_only %}
redir / https://{host}{uri}
{% elif slave_type == 'redirect' -%}
# TODO-Caddy RewriteRule (.*) {{slave_parameter.get('url', '')}}$1 [R,L]
redir 302 {
/ {{ slave_parameter.get('https-url', slave_parameter.get('url', ''))}}{uri}
}
{% elif slave_type == 'zope' -%}
proxy / {{ slave_parameter.get('https-url', slave_parameter.get('url', '')) }} {
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