Skip to content

Configuration does not account for cache invalidation on Document Server upgrades #18

@drebs

Description

@drebs

When there's a Document Server upgrade, web browsers have to download newer versions of JavaScript files. In the .deb file that ONLYOFFICE distributes, they add a "redirect trick" in the web server (Nginx) to make sure that a request for those files will redirect to a URL that the browser has never seen before, thus ensuring that a fresh file is downloaded.

If someone doesn't use that .deb and serves directly from node.js (my case), and if they come to this repository for aid on how to configure a proxy, then they'll bump into that issue and the users will have trouble using their servers after an upgrade.

For example, this is what upstream distributes in the Nginx configuration in their .deb:

#script caching protection
rewrite ^(\/web-apps\/apps\/(?!api\/).*)$ $the_scheme://$the_host/5.4.0-21/$1 redirect;

#disable caching for api.js
location ~ ^(\/[\d]+\.[\d]+\.[\d]+[\.|-][\d]+)?\/(web-apps\/apps\/api\/documents\/api\.js)$ {
  expires -1;
  # gzip_static on;
  alias  /var/www/onlyoffice/documentserver/$2;
}

Shouldn't the proxy config in this repo account for that use case, and thus include whatever cache invalidation configs should be in place?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions