D roles/gamja/files/config.json => roles/gamja/files/config.json +0 -6
@@ 1,6 0,0 @@
-{
- "server": {
- "url": "wss://gamja.xenrox.net/socket",
- "autojoin": ""
- }
-}
M roles/gamja/files/gamja.conf => roles/gamja/files/gamja.conf +13 -3
@@ 7,8 7,15 @@ server {
include /etc/nginx/snippets/https.conf;
server_name gamja.xenrox.net;
+ client_max_body_size 100M;
+
location / {
+ if ($http_cookie !~* "sr.ht.unified-login.v1") {
+ return 302 https://meta.xenrox.net/login?return_to=$scheme://$host$request_uri;
+ }
+
root /usr/share/webapps/gamja;
+ add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline';" always;
}
location /socket {
@@ 17,8 24,11 @@ server {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
- proxy_set_header X-Forwarded-For $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header Host $host;
+ include /etc/nginx/snippets/srht_web.conf;
+ }
+
+ location /config.json {
+ proxy_pass https://127.0.0.1:8082;
+ include /etc/nginx/snippets/srht_web.conf;
}
}
M roles/gamja/tasks/main.yml => roles/gamja/tasks/main.yml +0 -8
@@ 4,14 4,6 @@
name: gamja-git
state: present
-- name: Configure
- ansible.builtin.copy:
- src: config.json
- dest: /usr/share/webapps/gamja/config.json
- owner: root
- group: root
- mode: 0644
-
- name: Copy nginx conf
ansible.builtin.copy:
src: gamja.conf