mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
chore(Apache): minor improvements to Apache configuration
Add Cache-Control header for dynamic content.
This commit is contained in:
@@ -40,7 +40,7 @@
|
|||||||
<Proxy http://127.0.0.1:20000>
|
<Proxy http://127.0.0.1:20000>
|
||||||
RequestHeader set "x-webobjects-server-port" "8843"
|
RequestHeader set "x-webobjects-server-port" "8843"
|
||||||
RequestHeader set "x-webobjects-server-name" "CHANGETHIS:8843"
|
RequestHeader set "x-webobjects-server-name" "CHANGETHIS:8843"
|
||||||
RequestHeader set "x-webobjects-server-url" "http://CHANGETHIS:8843"
|
RequestHeader set "x-webobjects-server-url" "https://CHANGETHIS:8843"
|
||||||
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
|
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
|
||||||
AddDefaultCharset UTF-8
|
AddDefaultCharset UTF-8
|
||||||
</Proxy>
|
</Proxy>
|
||||||
|
|||||||
@@ -25,6 +25,11 @@ Alias /SOGo/WebServerResources/ \
|
|||||||
# Don't send the Referer header for cross-origin requests
|
# Don't send the Referer header for cross-origin requests
|
||||||
Header always set Referrer-Policy "same-origin"
|
Header always set Referrer-Policy "same-origin"
|
||||||
|
|
||||||
|
<Location /SOGo>
|
||||||
|
# Don't cache dynamic content
|
||||||
|
Header set Cache-Control "max-age=0, no-cache, no-store"
|
||||||
|
</Location>
|
||||||
|
|
||||||
## Uncomment the following to enable proxy-side authentication, you will then
|
## Uncomment the following to enable proxy-side authentication, you will then
|
||||||
## need to set the "SOGoTrustProxyAuthentication" SOGo user default to YES and
|
## need to set the "SOGoTrustProxyAuthentication" SOGo user default to YES and
|
||||||
## adjust the "x-webobjects-remote-user" proxy header in the "Proxy" section
|
## adjust the "x-webobjects-remote-user" proxy header in the "Proxy" section
|
||||||
@@ -48,8 +53,12 @@ Header always set Referrer-Policy "same-origin"
|
|||||||
#</Location>
|
#</Location>
|
||||||
|
|
||||||
ProxyRequests Off
|
ProxyRequests Off
|
||||||
SetEnv proxy-nokeepalive 1
|
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
|
SetEnv proxy-nokeepalive 1
|
||||||
|
|
||||||
|
# Uncomment the following lines if you experience "Bad gateway" errors with mod_proxy
|
||||||
|
#SetEnv proxy-initial-not-pooled 1
|
||||||
|
#SetEnv force-proxy-request-1.0 1
|
||||||
|
|
||||||
# When using CAS, you should uncomment this and install cas-proxy-validate.py
|
# When using CAS, you should uncomment this and install cas-proxy-validate.py
|
||||||
# in /usr/lib/cgi-bin to reduce server overloading
|
# in /usr/lib/cgi-bin to reduce server overloading
|
||||||
@@ -76,19 +85,19 @@ ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0 nocanon
|
|||||||
<Proxy http://127.0.0.1:20000/SOGo>
|
<Proxy http://127.0.0.1:20000/SOGo>
|
||||||
## Adjust the following to your configuration
|
## Adjust the following to your configuration
|
||||||
## and make sure to enable the headers module
|
## and make sure to enable the headers module
|
||||||
<IfModule headers_module>
|
<IfModule headers_module>
|
||||||
RequestHeader set "x-webobjects-server-port" "443"
|
RequestHeader set "x-webobjects-server-port" "443"
|
||||||
SetEnvIf Host (.*) HTTP_HOST=$1
|
SetEnvIf Host (.*) HTTP_HOST=$1
|
||||||
RequestHeader set "x-webobjects-server-name" "%{HTTP_HOST}e" env=HTTP_HOST
|
RequestHeader set "x-webobjects-server-name" "%{HTTP_HOST}e" env=HTTP_HOST
|
||||||
RequestHeader set "x-webobjects-server-url" "https://%{HTTP_HOST}e" env=HTTP_HOST
|
RequestHeader set "x-webobjects-server-url" "https://%{HTTP_HOST}e" env=HTTP_HOST
|
||||||
|
|
||||||
## When using proxy-side autentication, you need to uncomment and
|
## When using proxy-side autentication, you need to uncomment and
|
||||||
## adjust the following line:
|
## adjust the following line:
|
||||||
RequestHeader unset "x-webobjects-remote-user"
|
RequestHeader unset "x-webobjects-remote-user"
|
||||||
# RequestHeader set "x-webobjects-remote-user" "%{REMOTE_USER}e" env=REMOTE_USER
|
# RequestHeader set "x-webobjects-remote-user" "%{REMOTE_USER}e" env=REMOTE_USER
|
||||||
|
|
||||||
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
|
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
AddDefaultCharset UTF-8
|
AddDefaultCharset UTF-8
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user