Reputation: 150
I've tried to execute my django-app with "ngrok". Added url to "ALLOWED_HOSTS" and other variables which need that. I did 'py manage.py runserver' and 'ngrok http 80' together => no result.
Upvotes: 3
Views: 9718
Reputation: 52528
I was trying to have Stripe webhooks connect to my localhost via ngrok, but the incoming requests were seeing 404
s (weird, because these had worked in the past and nothing in the app nor stripe api had changed).
Ngrok didn't give any error message either, and it wasn't displaying the requests in the terminal as it usually would (I could see the 404 from the Stripe dashboard).
Solution: I upgraded ngrok to the most recent version (brew upgrade ngrok
), started a new terminal and started ngrok in the usual way, and the problem was gone.
Upvotes: 0
Reputation: 150
A few hours later, I figure out that you must run your ngrok from CMD, not from IDE Terminal.
P.S. If you set domain in 'C:\Windows\System32\Drivers\etc\ hosts' for your local address, that command help may help you:
ngrok http --host-header=rewrite mysite.com:80
where mysite.com - your domain name, :80 - your port.
Upvotes: 10