providers/app_gw: use full URL with protocol for internal/external_host
This commit is contained in:
parent
7221800a16
commit
83205f1b49
|
@ -0,0 +1,24 @@
|
|||
# Generated by Django 3.0.8 on 2020-07-26 17:45
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("passbook_providers_app_gw", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="applicationgatewayprovider",
|
||||
name="external_host",
|
||||
field=models.TextField(validators=[django.core.validators.URLValidator]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="applicationgatewayprovider",
|
||||
name="internal_host",
|
||||
field=models.TextField(validators=[django.core.validators.URLValidator]),
|
||||
),
|
||||
]
|
|
@ -3,6 +3,7 @@ import string
|
|||
from random import SystemRandom
|
||||
from typing import Optional, Type
|
||||
|
||||
from django.core.validators import URLValidator
|
||||
from django.db import models
|
||||
from django.forms import ModelForm
|
||||
from django.http import HttpRequest
|
||||
|
@ -20,8 +21,8 @@ class ApplicationGatewayProvider(Provider):
|
|||
Protocols by using a Reverse-Proxy."""
|
||||
|
||||
name = models.TextField()
|
||||
internal_host = models.TextField()
|
||||
external_host = models.TextField()
|
||||
internal_host = models.TextField(validators=[URLValidator])
|
||||
external_host = models.TextField(validators=[URLValidator])
|
||||
|
||||
client = models.ForeignKey(Client, on_delete=models.CASCADE)
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@
|
|||
<a href="{% url 'passbook_providers_app_gw:k8s-manifest' provider=provider.pk %}">{% trans 'Here' %}</a>
|
||||
<p>{% trans 'Afterwards, add the following annotations to the Ingress you want to secure:' %}</p>
|
||||
<textarea class="codemirror" readonly data-cm-mode="yaml">
|
||||
nginx.ingress.kubernetes.io/auth-url: "https://{{ provider.external_host }}/oauth2/auth"
|
||||
nginx.ingress.kubernetes.io/auth-signin: "https://{{ provider.external_host }}/oauth2/start?rd=$escaped_request_uri"
|
||||
nginx.ingress.kubernetes.io/auth-url: "{{ provider.external_host }}/oauth2/auth"
|
||||
nginx.ingress.kubernetes.io/auth-signin: "{{ provider.external_host }}/oauth2/start?rd=$escaped_request_uri"
|
||||
</textarea>
|
||||
</div>
|
||||
<footer class="pf-c-modal-box__footer pf-m-align-left">
|
||||
|
|
Reference in New Issue