Domain Whitelisting¶
A small Django/DRF app providing CRUD endpoints for whitelisted domains,
mirroring your metadata-tags pattern.
In APGAP this app is used to restrict from what domains email addresses for new accounts are being accepted.
Install¶
1) Add to INSTALLED_APPS:
2) Include URLs in your API urls (e.g., config/urls.py):
from django.urls import path, include
urlpatterns = [
# ...
path("api/", include("domain_whitelist.urls")),
]
3) Run migrations:
Endpoints (via DRF router)¶
GET /api/domain-whitelist/listPOST /api/domain-whitelist/createGET /api/domain-whitelist/{id}/retrievePATCH /api/domain-whitelist/{id}/partial updatePUT /api/domain-whitelist/{id}/updateDELETE /api/domain-whitelist/{id}/destroy
Filtering / Search / Ordering¶
- Filtering:
?domain=asu&description=lab - Search:
?search=example - Ordering:
?ordering=domainor?ordering=-created_at