Merge branch 'dev'

master
andryyy 2017-05-03 22:26:31 +02:00
commit 33ab4abc6e
2 changed files with 23 additions and 19 deletions

View File

@ -1,4 +1,8 @@
proxy_cache_path /tmp levels=1:2 keys_zone=sogo:10m inactive=24h max_size=1g; proxy_cache_path /tmp levels=1:2 keys_zone=sogo:10m inactive=24h max_size=1g;
map $http_x_forwarded_proto $client_req_scheme {
default $scheme;
https https;
}
server { server {
include /etc/nginx/conf.d/listen_ssl.active; include /etc/nginx/conf.d/listen_ssl.active;
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
@ -34,7 +38,7 @@ server {
real_ip_recursive on; real_ip_recursive on;
location = /principals/ { location = /principals/ {
rewrite ^ $scheme://$http_host/SOGo/dav; rewrite ^ $client_req_scheme://$http_host/SOGo/dav;
allow all; allow all;
} }
@ -92,7 +96,7 @@ server {
proxy_set_header x-webobjects-server-protocol HTTP/1.0; proxy_set_header x-webobjects-server-protocol HTTP/1.0;
proxy_set_header x-webobjects-remote-host $remote_addr; proxy_set_header x-webobjects-remote-host $remote_addr;
proxy_set_header x-webobjects-server-name $server_name; proxy_set_header x-webobjects-server-name $server_name;
proxy_set_header x-webobjects-server-url $scheme://$http_host; proxy_set_header x-webobjects-server-url $client_req_scheme://$http_host;
proxy_set_header x-webobjects-server-port $server_port; proxy_set_header x-webobjects-server-port $server_port;
client_body_buffer_size 128k; client_body_buffer_size 128k;
client_max_body_size 100m; client_max_body_size 100m;
@ -106,7 +110,7 @@ server {
proxy_set_header x-webobjects-server-protocol HTTP/1.0; proxy_set_header x-webobjects-server-protocol HTTP/1.0;
proxy_set_header x-webobjects-remote-host $remote_addr; proxy_set_header x-webobjects-remote-host $remote_addr;
proxy_set_header x-webobjects-server-name $server_name; proxy_set_header x-webobjects-server-name $server_name;
proxy_set_header x-webobjects-server-url $scheme://$http_host; proxy_set_header x-webobjects-server-url $client_req_scheme://$http_host;
proxy_set_header x-webobjects-server-port $server_port; proxy_set_header x-webobjects-server-port $server_port;
client_body_buffer_size 128k; client_body_buffer_size 128k;
client_max_body_size 100m; client_max_body_size 100m;
@ -179,7 +183,7 @@ server {
real_ip_recursive on; real_ip_recursive on;
location = /principals/ { location = /principals/ {
rewrite ^ $scheme://$http_host/SOGo/dav; rewrite ^ $client_req_scheme://$http_host/SOGo/dav;
allow all; allow all;
} }
@ -237,7 +241,7 @@ server {
proxy_set_header x-webobjects-server-protocol HTTP/1.0; proxy_set_header x-webobjects-server-protocol HTTP/1.0;
proxy_set_header x-webobjects-remote-host $remote_addr; proxy_set_header x-webobjects-remote-host $remote_addr;
proxy_set_header x-webobjects-server-name $server_name; proxy_set_header x-webobjects-server-name $server_name;
proxy_set_header x-webobjects-server-url $scheme://$http_host; proxy_set_header x-webobjects-server-url $client_req_scheme://$http_host;
proxy_set_header x-webobjects-server-port $server_port; proxy_set_header x-webobjects-server-port $server_port;
client_body_buffer_size 128k; client_body_buffer_size 128k;
client_max_body_size 100m; client_max_body_size 100m;
@ -251,7 +255,7 @@ server {
proxy_set_header x-webobjects-server-protocol HTTP/1.0; proxy_set_header x-webobjects-server-protocol HTTP/1.0;
proxy_set_header x-webobjects-remote-host $remote_addr; proxy_set_header x-webobjects-remote-host $remote_addr;
proxy_set_header x-webobjects-server-name $server_name; proxy_set_header x-webobjects-server-name $server_name;
proxy_set_header x-webobjects-server-url $scheme://$http_host; proxy_set_header x-webobjects-server-url $client_req_scheme://$http_host;
proxy_set_header x-webobjects-server-port $server_port; proxy_set_header x-webobjects-server-port $server_port;
client_body_buffer_size 128k; client_body_buffer_size 128k;
client_max_body_size 100m; client_max_body_size 100m;

View File

@ -14,7 +14,7 @@ delete/alias => POST data:
*/ */
header('Content-Type: application/json'); header('Content-Type: application/json');
require_once 'inc/prerequisites.inc.php'; require_once 'inc/prerequisites.inc.php';
error_reporting(E_ALL); error_reporting(0);
if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_username'])) { if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_username'])) {
if (isset($_GET['query'])) { if (isset($_GET['query'])) {