diff options
author | Luciano Iam <lucianito@gmail.com> | 2020-04-22 11:18:50 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-22 21:59:35 +0200 |
commit | 8b65b0a9613a7a25e415c2a9d402c602735cc221 (patch) | |
tree | 48f5d3d8f261af5a5847686951c03237115f4554 /libs | |
parent | b0733a0d2042e7baa41dbafc93744da3e54b5cbe (diff) |
WebSockets: disable http caching if NDEBUG is set
This is useful while developing web surface javascript code
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaces/websockets/server.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/surfaces/websockets/server.cc b/libs/surfaces/websockets/server.cc index 280efa5b89..7613d85e38 100644 --- a/libs/surfaces/websockets/server.cc +++ b/libs/surfaces/websockets/server.cc @@ -72,9 +72,11 @@ WebsocketsServer::WebsocketsServer (ArdourSurface::ArdourWebsockets& surface) _lws_mnt_root.origin = _resources.index_dir ().c_str (); _lws_mnt_root.origin_protocol = LWSMPRO_FILE; _lws_mnt_root.def = "index.html"; +#ifdef NDEBUG _lws_mnt_root.cache_max_age = 3600; _lws_mnt_root.cache_reusable = 1; _lws_mnt_root.cache_revalidate = 1; +#endif /* user defined surfaces in the user config directory */ memcpy (&_lws_mnt_user, &_lws_mnt_root, sizeof (lws_http_mount)); |