This fixes issue #23 related to mixed HTTP/HTTPS content, because api.geonames.org is not available over HTTPS for free-of-charge usage. This also has the advantage of defining a generic interface, so that we can support other sources of altitude data with different formatting (e.g. IGN) without changing the javascript code. While we are at it, also cache the result of API calls in Django. This will avoid hammering on the real API server if our javascript code is too enthusiastic. Proxying has a slight disadvantage: if the API server performs rate-limiting based on IP address, then we will reach the limit much more quickly. This is because all requests will now come from the celutz server, instead of from each individual client broswer.
|
||
|
||
|
||
|
||
|
||
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|