-1

I am referring to the tutorial, https://www.youtube.com/watch?v=0iB5IPoTDts. At from 1:18:09 in the tutorial, I am supposed to implement this code below

[Api call from a flask app in a docker container to a django app residing in another docker container][1]

But I keep getting maximum retry error. [Error image][2]

It seems like the get request is failing. I referred to the following link How to get the IP address of the docker host from inside a docker container, and tried solutions present in answer 1 and 2, but they give an error 400.

I am quite novice in flask and django. Please help. Thanks in advance. [1]: https://i.stack.imgur.com/O0tZf.png [2]: https://i.stack.imgur.com/UozYE.png

Tesla
  • 1
  • 2
  • How should I run `O0tZf.png` to reproduce the problem? (Can you edit the question to include a [mcve], as text and not images, in the question and not behind links?) – David Maze Jun 02 '21 at 12:56

1 Answers1

0

Adding the host to "allowed hosts" in settings.py resolved the error.

Reference: Invalid http_host header

4b0
  • 20,627
  • 30
  • 92
  • 137
Tesla
  • 1
  • 2