Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make sure we set X-DataLayer-Version even when using X-Accel-Redirect #2361

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docs/deploy/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/;
}
```
2 changes: 1 addition & 1 deletion umap/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ def render_to_response(self, context, **response_kwargs):
# (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


Expand Down
Loading