I'm trying to implement a RESTful API in Django such that any ip could query the endpoints. However, I'm concerned about header attacks if I were to set ALLOWED_HOSTS = ['*']
.
I read an answer to Why is Django throwing error "DisallowedHost at /"? which suggests that api calls should be responded to, not for by the server.
I don't full comprehend what they mean or how to implement it and am looking for suggestions.
Ultimately, I want to know how can I make an api call which is not blocked by django because it is not in ALLOWED_HOSTS?