Compare commits
3 Commits
882f1e26b3
...
c5fa34446e
Author | SHA1 | Date | |
---|---|---|---|
|
c5fa34446e | ||
|
1fd44949eb | ||
|
a280cabff1 |
@ -27,7 +27,7 @@ DEBUG = False
|
||||
|
||||
ALLOWED_HOSTS = ['0.0.0.0', '127.0.0.1', 'api', 'https://alkator.cz', 'https://beta.alkator.cz', 'localhost']
|
||||
|
||||
CSRF_TRUSTED_ORIGINS = ['https://alkator.cz', 'https://beta.alkator.cz']
|
||||
CSRF_TRUSTED_ORIGINS = ['https://alkator.cz', 'https://beta.alkator.cz', 'https://zaloha.alkator.cz']
|
||||
|
||||
# Application definition
|
||||
|
||||
@ -40,9 +40,11 @@ INSTALLED_APPS = [
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'alkatorapi',
|
||||
'django_prometheus',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django_prometheus.middleware.PrometheusBeforeMiddleware',
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
@ -50,8 +52,12 @@ MIDDLEWARE = [
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'django_prometheus.middleware.PrometheusAfterMiddleware',
|
||||
]
|
||||
|
||||
PROMETHEUS_LATENCY_BUCKETS = (0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0, 25.0, 50.0, 75.0, float("inf"),)
|
||||
|
||||
|
||||
ROOT_URLCONF = 'alkator.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
@ -80,7 +86,7 @@ SESSION_COOKIE_SECURE = True
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'ENGINE': 'django_prometheus.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ Including another URLconf
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
from django.urls import path, include
|
||||
from alkatorapi.views import (
|
||||
register_user, register_racer,
|
||||
login, logout,
|
||||
@ -51,4 +51,5 @@ urlpatterns = [
|
||||
path('api/cart/select_delivery', select_delivery),
|
||||
path('api/cart/delivery', delivery),
|
||||
path('api/forgotten_password', forgotten_password),
|
||||
path('', include('django_prometheus.urls')),
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user