mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
WebSockets: send caching headers for static resources
This commit is contained in:
parent
7118eff7eb
commit
4f2fdb10a3
1 changed files with 14 additions and 8 deletions
|
|
@ -67,17 +67,23 @@ WebsocketsServer::WebsocketsServer (ArdourSurface::ArdourWebsockets& surface)
|
|||
* list of surfaces is available as a dynamically generated json file
|
||||
*/
|
||||
memset (&_lws_mnt_root, 0, sizeof (lws_http_mount));
|
||||
_lws_mnt_root.mountpoint = "/";
|
||||
_lws_mnt_root.mountpoint_len = strlen (_lws_mnt_root.mountpoint);
|
||||
_lws_mnt_root.origin_protocol = LWSMPRO_FILE;
|
||||
_lws_mnt_root.origin = _resources.index_dir ().c_str ();
|
||||
_lws_mnt_root.mountpoint = "/";
|
||||
_lws_mnt_root.mountpoint_len = strlen (_lws_mnt_root.mountpoint);
|
||||
_lws_mnt_root.origin_protocol = LWSMPRO_FILE;
|
||||
_lws_mnt_root.origin = _resources.index_dir ().c_str ();
|
||||
_lws_mnt_root.cache_max_age = 3600;
|
||||
_lws_mnt_root.cache_reusable = 1;
|
||||
_lws_mnt_root.cache_revalidate = 1;
|
||||
|
||||
/* user defined surfaces in the user config directory */
|
||||
memset (&_lws_mnt_user, 0, sizeof (lws_http_mount));
|
||||
_lws_mnt_user.mountpoint = "/user";
|
||||
_lws_mnt_user.mountpoint_len = strlen (_lws_mnt_user.mountpoint);
|
||||
_lws_mnt_user.origin_protocol = LWSMPRO_FILE;
|
||||
_lws_mnt_user.origin = _resources.user_dir ().c_str ();
|
||||
_lws_mnt_user.mountpoint = "/user";
|
||||
_lws_mnt_user.mountpoint_len = strlen (_lws_mnt_user.mountpoint);
|
||||
_lws_mnt_user.origin_protocol = LWSMPRO_FILE;
|
||||
_lws_mnt_user.origin = _resources.user_dir ().c_str ();
|
||||
_lws_mnt_user.cache_max_age = 3600;
|
||||
_lws_mnt_user.cache_reusable = 1;
|
||||
_lws_mnt_user.cache_revalidate = 1;
|
||||
|
||||
_lws_mnt_root.mount_next = &_lws_mnt_user;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue