Bob Mottram 8 лет назад
Родитель
Сommit
bdf88572e8
1 измененных файлов: 6 добавлений и 4 удалений
  1. 6
    4
      src/freedombone-app-mailpile

+ 6
- 4
src/freedombone-app-mailpile Просмотреть файл

@@ -220,8 +220,9 @@ function install_mailpile {
220 220
             function_check nginx_limits
221 221
             nginx_limits $MAILPILE_DOMAIN_NAME '15m'
222 222
             echo "    proxy_pass        http://localhost:${MAILPILE_PORT}/;" >> $mailpile_nginx_site
223
-            echo '    proxy_set_header  Host $host;' >> $mailpile_nginx_site
224
-            echo '    proxy_buffering   off;' >> $mailpile_nginx_site
223
+            echo '    proxy_set_header X-Forwarded-Host $host;' >> $mailpile_nginx_site
224
+            echo '    proxy_set_header X-Forwarded-Server $host;' >> $mailpile_nginx_site
225
+            echo '    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' >> $mailpile_nginx_site
225 226
             echo '  }' >> $mailpile_nginx_site
226 227
             echo '}' >> $mailpile_nginx_site
227 228
         else
@@ -245,8 +246,9 @@ function install_mailpile {
245 246
         function_check nginx_limits
246 247
         nginx_limits $MAILPILE_DOMAIN_NAME '15m'
247 248
         echo "    proxy_pass        http://localhost:${MAILPILE_PORT}/;" >> $mailpile_nginx_site
248
-        echo '    proxy_set_header  Host $host;' >> $mailpile_nginx_site
249
-        echo '    proxy_buffering   off;' >> $mailpile_nginx_site
249
+        echo '    proxy_set_header X-Forwarded-Host $host;' >> $mailpile_nginx_site
250
+        echo '    proxy_set_header X-Forwarded-Server $host;' >> $mailpile_nginx_site
251
+        echo '    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' >> $mailpile_nginx_site
250 252
         echo '  }' >> $mailpile_nginx_site
251 253
         echo '}' >> $mailpile_nginx_site
252 254
     fi