Obfuscate admin page url
This commit is contained in:
parent
5367470daa
commit
89b3ea6e4f
|
@ -1,5 +1,11 @@
|
||||||
# Spaceport secrets file, don't commit to version control!
|
# Spaceport secrets file, don't commit to version control!
|
||||||
|
|
||||||
|
# /admin/ route obfuscation
|
||||||
|
# Set this to random characters
|
||||||
|
# For example, use the output of this:
|
||||||
|
# head /dev/urandom | base32 | head -c 16
|
||||||
|
ADMIN_RANDOM = ''
|
||||||
|
|
||||||
# /ipn/ route obfuscation
|
# /ipn/ route obfuscation
|
||||||
# Set this to random characters
|
# Set this to random characters
|
||||||
# For example, use the output of this:
|
# For example, use the output of this:
|
||||||
|
|
|
@ -7,6 +7,7 @@ from .api import views
|
||||||
from . import secrets
|
from . import secrets
|
||||||
|
|
||||||
IPN_ROUTE = r'^ipn/{}/'.format(secrets.IPN_RANDOM)
|
IPN_ROUTE = r'^ipn/{}/'.format(secrets.IPN_RANDOM)
|
||||||
|
ADMIN_ROUTE = '{}/admin/'.format(secrets.ADMIN_RANDOM)
|
||||||
|
|
||||||
router = routers.DefaultRouter()
|
router = routers.DefaultRouter()
|
||||||
router.register(r'door', views.DoorViewSet, basename='door')
|
router.register(r'door', views.DoorViewSet, basename='door')
|
||||||
|
@ -26,7 +27,7 @@ router.register(r'charts/signupcount', views.SignupCountViewSet, basename='signu
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('', include(router.urls)),
|
path('', include(router.urls)),
|
||||||
path('admin/', admin.site.urls),
|
path(ADMIN_ROUTE, admin.site.urls),
|
||||||
path('api-auth/', include('rest_framework.urls')),
|
path('api-auth/', include('rest_framework.urls')),
|
||||||
url(r'^rest-auth/', include('rest_auth.urls')),
|
url(r'^rest-auth/', include('rest_auth.urls')),
|
||||||
url(r'^registration/', views.RegistrationView.as_view(), name='rest_name_register'),
|
url(r'^registration/', views.RegistrationView.as_view(), name='rest_name_register'),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user