Compare commits

...

4 Commits
main ... taiga

Author SHA1 Message Date
meaz bfac7f1a54 add missing / static 2022-07-25 09:21:30 +02:00
meaz 948ceda529 fix error with api and frontdir 2022-07-10 12:51:12 +02:00
meaz 53ba2142e3
change path for taiga 2022-05-30 14:53:49 +02:00
meaz b6bd4159f2
taiga rewriting 2022-05-28 10:10:00 +02:00
1 changed files with 48 additions and 12 deletions

View File

@ -1,4 +1,5 @@
{% extends "core.j2" %}
{%block app_specific %}
large_client_header_buffers 4 32k;
client_max_body_size 50M;
@ -6,30 +7,65 @@
{% endblock %}
{% block location %}
location / {
root {{ taiga_front_dir }};
try_files $uri $uri/ /index.html;
}
# Frontend
location / {
alias {{ taiga_front_dir }}/dist/;
index index.html;
try_files $uri $uri/ index.html =404;
}
location /api {
# API
location /api/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass {{ taiga_api_url }};
proxy_pass http://127.0.0.1:8001/api/;
proxy_redirect off;
}
location /static {
alias {{ taiga_back_dir }}/static;
# Static files
location /static/ {
alias {{ taiga_back_dir }}/static/;
}
location /media {
alias {{ taiga_back_dir }}/media;
# Media
location /_protected/ {
internal;
alias {{ taiga_back_dir }}/media/;
add_header Content-disposition "attachment";
}
# Unprotected section
location /media/exports/ {
alias {{ taiga_back_dir }}/media/exports/;
add_header Content-disposition "attachment";
}
location /user-settings/user-change-password {
return 301 {{ taiga_user_change_passwd_url }};
location /media/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8003/;
proxy_redirect off;
}
# Events
location /events {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
proxy_pass http://127.0.0.1:8888/events;
}
# location /user-settings/user-change-password {
# return 301 {{ taiga_user_change_passwd_url }};
# }
{% endblock %}