providers/app_gw: fix URL Validation not working for internal and external host

This commit is contained in:
Jens Langhammer
2020-08-01 20:02:43 +02:00
parent d4a5269bf1
commit 1a21012911
2 changed files with 38 additions and 2 deletions

View File

@ -17,8 +17,12 @@ class ApplicationGatewayProvider(Provider):
Protocols by using a Reverse-Proxy."""
name = models.TextField()
internal_host = models.TextField(validators=[URLValidator])
external_host = models.TextField(validators=[URLValidator])
internal_host = models.TextField(
validators=[URLValidator(schemes=("http", "https"))]
)
external_host = models.TextField(
validators=[URLValidator(schemes=("http", "https"))]
)
client = models.ForeignKey(Client, on_delete=models.CASCADE)