English 中文(简体)
• 如何在IIS7中增加一个有限制的出入控制区头盔
原标题:How to add an Access-Control-Allow-Origin header in IIS7 with restrictions

I need to access a font file in my application from the server that I also own. It works for all browsers but Firefox, and I know that I need to add a Access-Control-Allow-Origin header.

因此,我服务器的根基是另一个有网络的应用程序。 我补充说:

<httpProtocol>
  <customHeaders>
    <add name="Access-Control-Allow-Origin" value="*" />
  </customHeaders>
</httpProtocol>

然而,我不敢肯定这里的安全问题是什么。 在这里,是否具体指明能够进入哪一领域? 我认为,我只拥有字体上的档案,而不是整个申请。 我看到了一个“htaccess”解决方案,它要求将档案放在理想的文件夹中,但我怎么能够用网络这样做。 混凝土或IIS的设置?

阿帕奇:

<FilesMatch ".(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "http://yourdomain.com"
</IfModule>
</FilesMatch>

感谢很多人,

最佳回答

您是否试图建立一个网络。 只把所期望的分数混为一谈? 查阅“

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签