Add validation for subdomains - eepsites

This commit is contained in:
Jesús 2021-05-30 17:40:52 -05:00
parent b661f90a83
commit 197586a2d8
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766
3 changed files with 28 additions and 0 deletions

View File

@ -203,3 +203,26 @@ CSRF_COOKIE_HTTPONLY = True
# security.W019
X_FRAME_OPTIONS = 'DENY'
```
## Validation subdomain in eepsite
Uncomment in `project/urls.py`
```python
from django.urls import path
from . import views
urlpatterns = [
path('', views.home, name="home"),
path('filename', views.i2pfile, name='i2pfile') # eepsite
]
```
also `project/views.py`
```python
def i2pfile(request):
return render(request, 'trabajo/filename')
```
and add `project/templates/trabajo/filename`

View File

@ -3,4 +3,5 @@ from . import views
urlpatterns = [
path('', views.home, name="home"),
# path('filename', views.i2pfile, name='i2pfile'),
]

View File

@ -39,3 +39,7 @@ def home(request):
return render(request, 'trabajo/index.djhtml',
{'projects': projects, 'form': contact_form})
# def i2pfile(request):
# return render(request, 'trabajo/filename')