Просмотр исходного кода

Adds advanced config header warning and replaces variable info with translation

Julian Reinhardt 4 лет назад
Родитель
Сommit
a5229d0e92
2 измененных файлов с 7 добавлено и 4 удалено
  1. 5 4
      frontend/js/app/nginx/proxy/form.ejs
  2. 2 0
      frontend/js/i18n/messages.json

+ 5 - 4
frontend/js/app/nginx/proxy/form.ejs

@@ -257,16 +257,17 @@
                 <div role="tabpanel" class="tab-pane" id="advanced">
                     <div class="row">
                         <div class="col-md-12">
-                            <p>Nginx variables available to you are:</p>
+                            <p><%- i18n('all-hosts', 'advanced-config-var-headline') %></p>
                             <ul class="text-monospace">
-                                <li>$server          # Host/IP</li>
-                                <li>$port            # Port Number</li>
-                                <li>$forward_scheme  # http or https</li>
+                                <li><code>$server</code> <%- i18n('proxy-hosts', 'forward-host') %></li>
+                                <li><code>$port</code> <%- i18n('proxy-hosts', 'forward-port') %></li>
+                                <li><code>$forward_scheme</code> <%- i18n('proxy-hosts', 'forward-scheme') %></li>
                             </ul>
                             <div class="form-group mb-0">
                                 <label class="form-label"><%- i18n('all-hosts', 'advanced-config') %></label>
                                 <textarea name="advanced_config" rows="8" class="form-control text-monospace" placeholder="# <%- i18n('all-hosts', 'advanced-warning') %>"><%- advanced_config %></textarea>
                             </div>
+                            <p class="small text-gray"><i class="fe fe-alert-triangle"></i> <%- i18n('all-hosts', 'advanced-config-header-info') %></p>
                         </div>
                     </div>
                 </div>

+ 2 - 0
frontend/js/i18n/messages.json

@@ -84,6 +84,8 @@
       "advanced": "Advanced",
       "advanced-warning": "Enter your custom Nginx configuration here at your own risk!",
       "advanced-config": "Custom Nginx Configuration",
+      "advanced-config-var-headline": "These proxy details are available as nginx variables:",
+      "advanced-config-header-info": "Please note, that any add_header or set_header directives added here will not be used by nginx. You will have to add a custom location '/' and add the header in the custom config there.",
       "hsts-enabled": "HSTS Enabled",
       "hsts-subdomains": "HSTS Subdomains",
       "locations": "Custom locations"