From 7bddf0abd631c7fc83d5906edfd987e8cd48c73b Mon Sep 17 00:00:00 2001 From: SDE Date: Fri, 12 Jan 2024 02:21:50 +0300 Subject: [PATCH] 0.4.54 fix 403 --- ServicesApp/js_views.py | 3 ++- pAerBim/settings.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ServicesApp/js_views.py b/ServicesApp/js_views.py index 29e701c..fb8aa7f 100644 --- a/ServicesApp/js_views.py +++ b/ServicesApp/js_views.py @@ -15,8 +15,9 @@ from django.template.loader import render_to_string from django.urls import reverse from .funcs import * from django.utils.translation import activate, get_language_info +from django.views.decorators.csrf import csrf_exempt - +@csrf_exempt def get_content_for_section_ajax(request): if request.method != 'POST': diff --git a/pAerBim/settings.py b/pAerBim/settings.py index 3a5ae6f..de3929c 100644 --- a/pAerBim/settings.py +++ b/pAerBim/settings.py @@ -28,8 +28,8 @@ DEBUG = True ALLOWED_HOSTS = ['*'] -CSRF_TRUSTED_ORIGINS = ['https://aerbim.com/'] -SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') +# CSRF_TRUSTED_ORIGINS = ['https://aerbim.com/'] +# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') # Application definition