Skip to content

Commit

Permalink
Make WEBROOT_REDIRECT configurable in setup
Browse files Browse the repository at this point in the history
closes Mailu#860
  • Loading branch information
Nebukadneza committed Jan 26, 2019
1 parent 77ec049 commit 7b677a6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
6 changes: 6 additions & 0 deletions setup/flavors/compose/mailu.env
Expand Up @@ -110,7 +110,13 @@ COMPRESSION_LEVEL={{ compression_level }}
###################################

# Path to redirect / to
{% if webroot_redirect == '' %}
# You did not set any webroot redirect URL.
# We default to /webmail to start error-free, regardless if you have webmail configured
WEBROOT_REDIRECT=/webmail
{% else %}
WEBROOT_REDIRECT={{ webroot_redirect }}
{% endif %}

# Path to the admin interface if enabled
WEB_ADMIN={{ admin_path }}
Expand Down
3 changes: 2 additions & 1 deletion setup/templates/steps/compose/02_services.html
Expand Up @@ -7,7 +7,8 @@
<p>A Webmail is a Web interface exposing an email client. Mailu webmails are
bound to the internal IMAP and SMTP server for users to access their mailbox through
the Web. By exposing a complex application such as a Webmail, you should be aware of
the security implications caused by such an increase of attack surface.<p>
the security implications caused by such an increase of attack surface.
Remember to set Webroot-redirect above!</p>
<div class="form-group">
<label>Enable Web email client (and path to the Web email client)</label>
<!-- <div class="radio"> -->
Expand Down
7 changes: 7 additions & 0 deletions setup/templates/steps/config.html
Expand Up @@ -82,6 +82,13 @@
<input class="form-control" type="text" name="admin_path" id="admin_path" style="display: none">
</div>

<div class="form-group">
<label>Webroot (<code>/</code>) redirect</label>
<p>The root/base of your web-server should redirect somewhere: This can be an the admin-interface or — as default — the webmailer. Note that if you change the webmail path below, you need to change this too.</p>
<p>Examples: <code>/webmail</code>; <code>/admin</code></p>
<input class="form-control" type="text" name="webroot_redirect" id="webroot_redirect" value="/webmail">
</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<script type="text/javascript" src="{{ url_for('static', filename='render.js') }}"></script>
Expand Down
3 changes: 2 additions & 1 deletion setup/templates/steps/stack/02_services.html
Expand Up @@ -7,7 +7,8 @@
<p>A Webmail is a Web interface exposing an email client. Mailu webmails are
bound to the internal IMAP and SMTP server for users to access their mailbox through
the Web. By exposing a complex application such as a Webmail, you should be aware of
the security implications caused by such an increase of attack surface.<p>
the security implications caused by such an increase of attack surface.
Remember to set Webroot-redirect above!</p>
<div class="form-group">
<label>Enable Web email client (and path to the Web email client)</label>
<br/>
Expand Down

0 comments on commit 7b677a6

Please sign in to comment.