Serve static plugin assets with a `Cache-Control: no-cache, public` header. This avoids caching a 404 response for such an asset, preventing it from being loaded until expiry even if the file later becomes available.
This is currently preventing updates of plugins on community and would generally affect any customer with a cache in front of the Mattermost servers.
Fixes: https://mattermost.atlassian.net/browse/MM-20948
* Consistent license message for all the go files
* Fixing the last set of unconsistencies with the license headers
* Addressing PR review comments
* Fixing busy.go and busy_test.go license header
* Added OSVersion to unsupported browser template (and some test code)
* [MM-17569] Working prototype (not functional) of unsupported browser page
* WIP
* WIP
* [MM-17571] Unsupported browser page template logic
* WIP
* [MM-17572][MM-17573] Added browsers and tested for unsupported under IE and Safari
* Clean-up
* Added missing license header
* Fixed a test
* Blank commit to force CI update
* PR feedback
* oops
* plugins: compute bundle hash on load
Use this hash to bust client caches whenever the plugin bundle changes.
* eliminate redundant pluginHandler
* switch to 64-bit FNV-1a
* Fix test
* factor out GetSubpathFromConfig
* mv web/subpath.go to utils/subpath.go
* serve up web, api and ws on /subpath if configured
* pass config to utils.RenderWeb(App)?Error
This allows the methods to extract the configured subpath and redirect
to the appropriate `/subpath/error` handler.
* ensure GetSubpathFromConfig returns trailing slashes deterministically
* fix error 404 handling
* redirect /subpath to /subpath/
This is necessary for the static handler to match, otherwise none of the
registered routes find anything. This also makes it no longer necessary
to add trailing slashes in the root router.
Examine ServiceSettings.SiteURL on startup and rewrite assets
accordingly if not in a development environment.
Also export `mattermost config subpath` command to manually do same.
This accompanies a webapp PR to use the updated `root.html` to define
the necessary webpack asset path for dynamically loading assets.
* Refactor context out of API packages
* Update function names per feedback
* Move webhook handlers to web and fix web tests
* Move more webhook tests out of api package
* Fix static handler