@login_required
def list_user_info(request, user):
conn = ldap_connect(request)
search_filter = '(mailLocalAddress=' + user + ')'
conn.search('dc=isu, dc=ru', search_filter, attributes=['sn', 'mailLocalAddress', 'mailRoutingAddress'])
user = conn.entries[0]
form = UserEditForm(data=request.POST or None, initial={'sn': user.sn, 'ml': user.mailLocalAddress, 'mr': user.mailRoutingAddress})
if form.is_valid():
sn = form.cleaned_data.get('sn')
mailLocalAddress = form.cleaned_data.get('ml')
mailRoutingAddress = form.cleaned_data.get('mr')
print(sn, mailLocalAddress, mailRoutingAddress)
return render(request, 'userinfo.html', {'form': form, 'forward': forward})
Вопрос в том, как правильно сделать dual stack (ipv4, ipv6) в схеме с reverse-proxy для http[s] трафика.