mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: make sure we set X-DataLayer-Version even when using X-Accel-Redirect (#2361)
This commit is contained in:
commit
dd89984e28
3 changed files with 20 additions and 6 deletions
|
@ -20,6 +20,18 @@ we introduce two new map statuses:
|
|||
|
||||
Also pursuing the code cleaning (more modules and spliting uMap core code from Leaflet rendering one).
|
||||
|
||||
Finally, this is now the javascript who create the datalayer uuid, and then create it to the back. This
|
||||
is for preparing for the synchronisation between clients.
|
||||
|
||||
### Breaking change
|
||||
|
||||
* if you use `X-Accel-Redirect` with Nginx, you **must** make sure that the `X-DataLayer-Version` header
|
||||
is forwarded to the client. This is the line you usually need to add in your Nginx `/internal/` config:
|
||||
|
||||
add_header X-DataLayer-Version $upstream_http_x_datalayer_version;
|
||||
|
||||
See the [documentation](deploy/nginx.md) for more informations.
|
||||
|
||||
### New features
|
||||
* add umap helm chart for Kubernetes deployment by @NaPs in #2286
|
||||
* support storing layer data in S3 like servers by @yohanboniface in #2304
|
||||
|
@ -57,15 +69,15 @@ Also pursuing the code cleaning (more modules and spliting uMap core code from L
|
|||
|
||||
### Changed templates
|
||||
* umap/css.html:
|
||||
- added `umap/css/bar.css`
|
||||
- added `umap/css/popup.css`
|
||||
* added `umap/css/bar.css`
|
||||
* added `umap/css/popup.css`
|
||||
* umap/js.html:
|
||||
- added `umap/css/bar.js`
|
||||
* added `umap/css/bar.js`
|
||||
* umap/templates/registration/login.html
|
||||
* umap/templates/umap/map_init.html
|
||||
- changed the way we instanciate `Umap` (instead of `U.Map`)
|
||||
* changed the way we instanciate `Umap` (instead of `U.Map`)
|
||||
* umap/templates/umap/user_dashboard.html
|
||||
- changed the way we instanciate `Umap` (instead of `U.Map`)
|
||||
* changed the way we instanciate `Umap` (instead of `U.Map`)
|
||||
|
||||
### New Contributors
|
||||
* @NaPs made their first contribution in #2286
|
||||
|
|
|
@ -116,6 +116,8 @@ UMAP_XSENDFILE_HEADER = 'X-Accel-Redirect'
|
|||
internal;
|
||||
gzip_vary on;
|
||||
gzip_static on;
|
||||
# Next line is very important!
|
||||
add_header X-DataLayer-Version $upstream_http_x_datalayer_version;
|
||||
alias /path/to/umap/var/data/;
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1168,7 +1168,7 @@ class DataLayerView(BaseDetailView):
|
|||
# (no gzip/cache-control/If-Modified-Since/If-None-Match)
|
||||
data = self.filedata
|
||||
response = HttpResponse(data, content_type="application/geo+json")
|
||||
response["X-Datalayer-Version"] = self.fileversion
|
||||
response["X-Datalayer-Version"] = self.fileversion
|
||||
return response
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue