From b20151fff373100da7946df93afb7dd4dccea3e4 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 23 Mar 2013 00:04:36 -0400 Subject: copy dashboard to the output folder and load from the file system, instead of using embedded resources --- MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs') diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs index 0fc2c0dda..79663dca9 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpServer.cs @@ -162,9 +162,18 @@ namespace MediaBrowser.Server.Implementations.HttpServer if (!string.IsNullOrEmpty(exception.Message)) { - res.AddHeader("X-Application-Error-Code", exception.Message); + res.AddHeader("X-Application-Error-Code", exception.Message.Replace(Environment.NewLine, " ")); } } + + if (dto is CompressedResult) + { + // Per Google PageSpeed + // This instructs the proxies to cache two versions of the resource: one compressed, and one uncompressed. + // The correct version of the resource is delivered based on the client request header. + // This is a good choice for applications that are singly homed and depend on public proxies for user locality. + res.AddHeader("Vary", "Accept-Encoding"); + } }); } -- cgit v1.2.3