kopia lustrzana https://github.com/OpenDroneMap/WebODM
Added CORS module to Django
rodzic
cc979283d7
commit
8fe49d16fa
|
@ -31,3 +31,4 @@ strict-rfc3339==0.7
|
|||
tzlocal==1.3
|
||||
uritemplate==3.0.0
|
||||
webcolors==1.5
|
||||
django-cors-headers==2.0.2
|
||||
|
|
|
@ -46,6 +46,7 @@ INSTALLED_APPS = [
|
|||
'rest_framework',
|
||||
'rest_framework_nested',
|
||||
'webpack_loader',
|
||||
'corsheaders',
|
||||
# 'debug_toolbar',
|
||||
'app',
|
||||
'nodeodm',
|
||||
|
@ -53,6 +54,7 @@ INSTALLED_APPS = [
|
|||
|
||||
MIDDLEWARE = [
|
||||
# 'debug_toolbar.middleware.DebugToolbarMiddleware',
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
|
@ -201,6 +203,9 @@ LOGGING = {
|
|||
LOGIN_REDIRECT_URL = '/dashboard/'
|
||||
LOGIN_URL = '/login/'
|
||||
|
||||
# CORS (very relaxed settings, users might want to change this in production)
|
||||
CORS_ORIGIN_ALLOW_ALL = True
|
||||
|
||||
# File uploads
|
||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'app', 'media')
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue