Skip to content

Commit

Permalink
Apply code suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
nbianca committed Oct 23, 2024
1 parent 2eeb068 commit 61dad8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions templates/web.socketed.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ run:
#!/bin/bash
rm -rf /shared/nginx.http*.sock
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
filename: "/etc/nginx/conf.d/outlets/server/http.conf"
from: /listen 80;/
to: |
listen unix:/shared/nginx.http.sock;
set_real_ip_from unix:;
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: /listen 443 ssl http2;/
filename: "/etc/nginx/conf.d/outlets/server/https.conf"
from: /listen 443 ssl;/
to: |
listen unix:/shared/nginx.https.sock ssl http2;
listen unix:/shared/nginx.https.sock ssl;
set_real_ip_from unix:;
5 changes: 3 additions & 2 deletions templates/web.ssl.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ run:
hook: ssl
path: "/etc/nginx/conf.d/outlets/server/https.conf"
contents: |
listen 443 ssl http2;
listen 443 ssl;
http2 on;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
Expand Down Expand Up @@ -46,5 +47,5 @@ run:
- |-
if [ -f "/proc/net/if_inet6" ] ; then
sed -i 's/listen 80;/listen 80;\nlisten [::]:80;/g' /etc/nginx/conf.d/outlets/before-server/redirect-http-to-https.conf
sed -i 's/listen 443 ssl http2;/listen 443 ssl http2;\nlisten [::]:443 ssl http2;/g' /etc/nginx/conf.d/outlets/server/https.conf
sed -i 's/listen 443 ssl;/listen 443 ssl;\nlisten [::]:443 ssl;/g' /etc/nginx/conf.d/outlets/server/https.conf
fi

0 comments on commit 61dad8e

Please sign in to comment.