I am streaming data from server to client for download using filestream.write
. In that case what is happening is that I am able to download the file but it does not
In the past I built a whitelist to allow some domains to iframe my site. Remember Google's image cache used to iframe sites as well.
static HashSet frameWhiteList = new HashSet { "www.domain.com",
"mysub.domain.tld",
"partner.domain.tld" };
protected void EnforceFrameSecurity()
{
var framer = Request.UrlReferrer;
string frameOptionsValue = "SAMEORIGIN";
if (framer != null)
{
if (frameWhiteList.Contains(framer.Host))
{
frameOptionsValue = string.Format("ALLOW-FROM {0}", framer.Host);
}
}
if (string.IsNullOrEmpty(HttpContext.Current.Response.Headers["X-FRAME-OPTIONS"]))
{
HttpContext.Current.Response.AppendHeader("X-FRAME-OPTIONS", frameOptionsValue);
}
}