Closed rnestler closed 2 months ago
Hmm but on the other hand this will break testing of the demo.
I think the scheme (ie http or https) needs to be derived from the request object used to render the view. It should be able to indicate what is used on the client, even allowing for a reverse proxy or similar.
Telling curl to redirect (and as a POST) seems to work:
curl -L --post301 --post302 http://djangoplotlydash.com/dpd/views/poke/ -d'{"channel_name":"live_button_counter","label":"named_counts","value":{"click_colour":"cyan"}}'
This is possibly a bit safer than trying to work out what the scheme is (it should be forwarded on by any intervening reverse proxy, but will always be a potential point of failure).
Closing as this PR is no longer needed
The page redirects from http to https: