Add the uwsgi_param 'HTTP_X_FORWARDED_PORT' to nginx configuration, This prevents the python-saml "invalid_response" error