Added login api

This commit is contained in:
infidel
2022-11-30 15:58:16 +07:00
parent 263218ed9e
commit d5d3401265
7319 changed files with 912655 additions and 22 deletions

View File

@@ -25,7 +25,7 @@ SECRET_KEY = 'django-insecure-n(+d-xz5933rr363)v31jcdl^+#ab23&s317uxek+d*-_d6q99
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ["192.168.10.2", "127.0.0.1", "localhost:8000", "localhost:5000", "wg-django-backend-ma-wg.apps-crc.testing"]
ALLOWED_HOSTS = ["192.168.10.2", "127.0.0.1", "localhost:8000", "localhost:5000", "wg-django-backend-ma-wg.apps-crc.testing", "wg.nnag.me"]
# Application definition
@@ -59,9 +59,12 @@ CORS_ORIGIN_WHITELIST = [
'http://127.0.0.1:3000',
'http://localhost:5000',
'http://127.0.0.1:5000',
'http://wg.nnag.me'
'https://wg.nnag.me'
]
CSRF_TRUSTED_ORIGINS = ['https://wg.nnag.me']
CSRF_COOKIE_SECURE = True
ROOT_URLCONF = 'wgweb.urls'
TEMPLATES = [

View File

@@ -1,5 +1,4 @@
"""wgweb URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.1/topics/http/urls/
Examples:
@@ -24,7 +23,9 @@ router.register(r'wgAPI', views.wgView, 'wg_api')
urlpatterns = [
path('admin/', admin.site.urls),
path('api/', include(router.urls)),
path('api2/wgLogin', views.wgLogin.as_view()),
path('api2/wgLogs', views.wgViewLogs),
path('api2/wgClients', views.wgViewClients),
path('api2/wgEdit', views.wgEditClients)
path('api2/wgEditState', views.get_EditState),
path('api2/wgEditClient', views.get_EditClient)
]