Add host headers to pleroma

This commit is contained in:
Bob Mottram 2018-03-08 21:13:02 +00:00
parent d7b5a04b2c
commit 9b44f6d23c
1 changed files with 8 additions and 2 deletions

View File

@ -1052,9 +1052,12 @@ function install_pleroma {
echo ' location / {'; } >> "$pleroma_nginx_site"
function_check nginx_limits
nginx_limits "$PLEROMA_DOMAIN_NAME" '15m'
{ echo ' proxy_http_version 1.1;';
{ echo " add_header 'Access-Control-Allow-Origin' '*';";
echo ' proxy_http_version 1.1;';
echo " proxy_set_header Upgrade \$http_upgrade;";
echo ' proxy_set_header Connection "upgrade";';
echo " proxy_set_header Host \$http_host;";
echo '';
echo " proxy_pass http://localhost:$PLEROMA_PORT;";
echo ' }';
echo '';
@ -1090,9 +1093,12 @@ function install_pleroma {
echo ' location / {'; } >> "$pleroma_nginx_site"
function_check nginx_limits
nginx_limits "$PLEROMA_DOMAIN_NAME" '15m'
{ echo ' proxy_http_version 1.1;';
{ echo " add_header 'Access-Control-Allow-Origin' '*';";
echo ' proxy_http_version 1.1;';
echo " proxy_set_header Upgrade \$http_upgrade;";
echo ' proxy_set_header Connection "upgrade";';
echo " proxy_set_header Host \$http_host;";
echo '';
echo " proxy_pass http://localhost:$PLEROMA_PORT;";
echo ' }';
echo '';