Spaces:
Configuration error
Configuration error
Allow cors
Browse files- config/settings.py +9 -1
- config/urls.py +1 -0
config/settings.py
CHANGED
@@ -42,7 +42,14 @@ INSTALLED_APPS = [
|
|
42 |
'drf_yasg',
|
43 |
'texttovoice',
|
44 |
'accounts',
|
45 |
-
'rest_framework.authtoken'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
]
|
47 |
|
48 |
REST_FRAMEWORK = {
|
@@ -65,6 +72,7 @@ MIDDLEWARE = [
|
|
65 |
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
66 |
'django.contrib.messages.middleware.MessageMiddleware',
|
67 |
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
|
68 |
]
|
69 |
|
70 |
ROOT_URLCONF = 'config.urls'
|
|
|
42 |
'drf_yasg',
|
43 |
'texttovoice',
|
44 |
'accounts',
|
45 |
+
'rest_framework.authtoken',
|
46 |
+
'corsheaders',
|
47 |
+
]
|
48 |
+
|
49 |
+
CORS_ALLOW_ALL_ORIGINS = True # If this is used then `CORS_ALLOWED_ORIGINS` will not have any effect
|
50 |
+
CORS_ALLOW_CREDENTIALS = True
|
51 |
+
CORS_ALLOWED_ORIGINS = [
|
52 |
+
'*',
|
53 |
]
|
54 |
|
55 |
REST_FRAMEWORK = {
|
|
|
72 |
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
73 |
'django.contrib.messages.middleware.MessageMiddleware',
|
74 |
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
75 |
+
'corsheaders.middleware.CorsMiddleware',
|
76 |
]
|
77 |
|
78 |
ROOT_URLCONF = 'config.urls'
|
config/urls.py
CHANGED
@@ -14,6 +14,7 @@ schema_view = get_schema_view(
|
|
14 |
license=openapi.License(name="Your License"),
|
15 |
),
|
16 |
public=True,
|
|
|
17 |
permission_classes=(permissions.AllowAny,),
|
18 |
)
|
19 |
|
|
|
14 |
license=openapi.License(name="Your License"),
|
15 |
),
|
16 |
public=True,
|
17 |
+
url="https://undetectable-voice-clone.hf.space/",
|
18 |
permission_classes=(permissions.AllowAny,),
|
19 |
)
|
20 |
|