librelist archives

« back to archive

HTTPS scheme in URL rules?

HTTPS scheme in URL rules?

From:
Kerem Ulutaş
Date:
2012-10-14 @ 17:56
Hi,

I'm building a secure payment subdomain for my Flask application.

...
app.add_url_rule("/", view_func=Payment.as_view("payment"),
subdomain="payment")
app.add_url_rule("/", view_func=Index.as_view("index"))
...

Payment and Index are subclasses of MethodView. I've set up SERVER_NAME as
well.

I'm trying to get "https://payment.example.com" when I call
url_for("payment") but I get the HTTP scheme version.

I wonder if there is any setting or parameter for this. I've searched
through Werkzeug and Flask documentation but no luck.

I haven't tried PREFERRED_URL_SCHEME because I assume it changes scheme for
all URL's.

Thanks

-- 

The box said "Requires Windows 95, NT, or better", so I installed Linux.