From 7eccad198895e39784081f6fc3da28f8feee71fd Mon Sep 17 00:00:00 2001 From: Mikhail Kasatkin <110116963+MikeWazowskyi@users.noreply.github.com> Date: Tue, 5 Sep 2023 23:52:17 +0400 Subject: [PATCH] Bugfix/change password set reset url (#285) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Добавлен путь users. * Изменен путь для шаблона email. --- infra/dev/nginx.stage.conf.template | 7 +++++++ infra/prod/nginx.prod.conf.template | 7 +++++++ src/config/settings.py | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/infra/dev/nginx.stage.conf.template b/infra/dev/nginx.stage.conf.template index f6a7bbd1..2c00a1aa 100644 --- a/infra/dev/nginx.stage.conf.template +++ b/infra/dev/nginx.stage.conf.template @@ -25,6 +25,13 @@ server { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; + + location /users/ { + proxy_pass http://spread-wings-bot:8000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; } error_page 500 502 503 504 /50x.html; diff --git a/infra/prod/nginx.prod.conf.template b/infra/prod/nginx.prod.conf.template index ea1449a0..ac25d900 100644 --- a/infra/prod/nginx.prod.conf.template +++ b/infra/prod/nginx.prod.conf.template @@ -27,6 +27,13 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } + location /users/ { + proxy_pass http://spread-wings-bot:8000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } error_page 500 502 503 504 /50x.html; diff --git a/src/config/settings.py b/src/config/settings.py index c65ab9c0..b991ac10 100644 --- a/src/config/settings.py +++ b/src/config/settings.py @@ -116,7 +116,7 @@ EMAIL_BACKEND = env.str( "EMAIL_BACKEND", default="django.core.mail.backends.console.EmailBackend" ) -EMAIL_TEMPLATE_NAME = "email.html" +EMAIL_TEMPLATE_NAME = "emailing/email.html" EMAIL_HOST = env.str("EMAIL_HOST") try: EMAIL_PORT = env.int("EMAIL_PORT")