Commit graph

21 commits

Author SHA1 Message Date
Yohan Boniface
597b3bb10f Change proxy_cache_key value in documentation
Now that the case is done in the internal redirect part, there is
no more args, the URL is on the path
2023-08-29 10:37:12 +02:00
Yohan Boniface
5156da6107 doc: add resolver where needed in nginx configuration 2023-08-28 18:10:22 +02:00
Yohan Boniface
2904bcc617 More documentation about "ajax-proxy" 2023-08-28 16:36:50 +02:00
Yohan Boniface
7210b1ddb9 Remove useless resolver from nginx config in doc 2023-08-24 17:48:41 +02:00
Yohan Boniface
c4bdb04795 Use X-Accel-Redirect for serving ajax-proxy request
uMap allows to use remote URL as data sources, but those URLs
are not always CORS open, so this is why there is this "ajax-proxy"
feature, where the URL is passed to the backend.

Additionally, there is a caching feature, which duration is configurable
through frontend settings. Valid values are: disabled, 5 min, 1 hour,
1 day.

Initially, I wanted this to be totally handled by Nginx, but I never
found a wayt to set the proxy_cache_valid value from a query string.

Since then, at least in OSM France servers, the ajax-proxy is still
handled by a Django view, which then opens the remote URL and transfert
the data. This is not optimal. And I suppose this is what is causing
hicups on the OSM France servers lately.

This PR provides a mix option, where python deals with validating the
URL and parsing the TTL parameter, and then it passes the hand to
nginx which will serve the remote content.

So, roughtly:

- the client calls /ajax-proxy/?url=xxx&ttl=300
- python will validate the URL (not internal calls…)
- if UMAP_SENDFILE_HEADER is set, then the python returns an empty
  response with the path /proxy/http://url plus it will set the
  cache ttl through the header X-Accel-Expires
- this /proxy/ location is then handled by nginx
2023-08-24 13:41:34 +02:00
remco
c0063d2fa2 Fix permisson problem, use suggestion from #407 2023-06-14 21:47:37 +02:00
Yohan Boniface
89e0900148 Review ubuntu packages after fresh install 2023-05-05 15:57:32 +02:00
Yohan Boniface
894facc7e3 Document x-accel-redirect and ajax-proxy cache configuration 2023-02-27 12:32:35 +01:00
Binnette
e2ca1ecd63 Normalize keyboard shortcuts in translation 2020-03-29 20:17:00 +02:00
Binnette
00d42c5b03
Improve documentation (#746)
Add docs: setup a dev environment and server administration
2020-02-26 21:31:39 +01:00
Lars Lingner
90c7b38114
Update ubuntu from scratch doc
I had to add a config for /static and /uploads folder in nginx when I set DEBUG = False
2019-10-08 10:06:30 +02:00
Asish Abraham Joseph
7c20190e01
Added missing dependency packages
Added missing ownership to deployment directories
2018-11-15 11:41:58 +05:30
Yohan Boniface
fbb7125167 Merge changelogs and add first changelog for 1.0.0 2018-06-16 13:53:06 +02:00
Yohan Boniface
4c8b6f79de Fallback looking for settings file at /etc/umap/umap.conf
fix #487
2017-05-10 19:14:35 +02:00
Yohan Boniface
ea7ecbfc6d Change pip install instruction in doc 2017-02-06 16:34:23 +01:00
Yohan Boniface
b374ad6479 Add a not in the tutorial about adding more tilelayers and such 2016-11-26 17:39:10 +01:00
Yohan Boniface
8b3d8c5ece Add a migration to create a Licence if none exists 2016-11-26 17:29:00 +01:00
Yohan Boniface
3c32377c42 Add a migration to create a TileLayer if none exists 2016-11-26 17:25:59 +01:00
Yohan Boniface
9de6a6ae0a Tutorial: install from github for now
=
2016-09-24 07:38:57 +02:00
Yohan Boniface
2206c6a1c4 add storagei18n in Ubuntu tutorial 2016-09-11 13:05:38 +02:00
Yohan Boniface
07e6b62012 Ubuntu installation turorial draft 2016-09-10 16:21:09 +02:00