Allow to serve static WebAssembly and TensorFlow Lite files#7585
Merged
ChristophWurst merged 1 commit intomasterfrom Nov 17, 2021
Merged
Conversation
Since Talk 13 (and thus Nextcloud 23) WebAssembly (.wasm) and TensorFlow Lite (.tflite) files need to be loaded from the web server to provide certain features (like the background blur in the WebUI). Those files can be treated in a similar way to other static resources, and there should not be any problem caching or compressing them. However, as compressed TensorFlow Lite files are only ~12% smaller, the compression directive depends on the MIME type and there is no standard MIME type for TensorFlow Lite files, for now only WebAssembly files are compressed. Depending on the setup "application/wasm" may not be associated with ".wasm" files, so the directive was added just in case, as the compression is enabled through the MIME type and, besides that, the browsers log a warning if the expected MIME type is not returned. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Member
Author
|
/backport to stable23 |
nickvergessen
approved these changes
Nov 17, 2021
juliusknorr
approved these changes
Nov 17, 2021
ChristophWurst
approved these changes
Nov 17, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NGINX equivalent to nextcloud/server#29747
Since Talk 13 (and thus Nextcloud 23) WebAssembly (.wasm) and TensorFlow Lite (.tflite) files need to be loaded from the web server to provide certain features (like the background blur in the WebUI).
Those files can be treated in a similar way to other static resources, and there should not be any problem caching or compressing them. However, as compressed TensorFlow Lite files are only ~12% smaller, the compression directive depends on the MIME type and there is no standard MIME type for TensorFlow Lite files, for now only WebAssembly files are compressed.
Depending on the setup application/wasm may not be associated with .wasm files, so the directive was added just in case, as the compression is enabled through the MIME type and, besides that, the browsers log a warning if the expected MIME type is not returned.
In any case my NGINX knowledge is almost null, so please review carefully :-)