[Mono-aspnet-list] Cross Domain Scripting

Robert Jordan robertj at gmx.net
Mon Dec 5 12:10:35 EST 2011


On 05.12.2011 17:28, Tim Nelson wrote:
> I need for a test to enable cross-domain scripting on a mod_mono
> server I have running.  I have found something that says I just need
> to add the XML to my Web.config (below), but mono crashes when it sees
> it.  How do I enable cross-domain scripting?
>
> <?xml version="1.0" encoding="utf-8"?>
> <configuration>
>   <system.webServer>
>     <httpProtocol>
>       <customHeaders>
>         <add name="Access-Control-Allow-Origin" value="*" />
>       </customHeaders>
>     </httpProtocol>
>   </system.webServer>
> </configuration>

Mono's ASP.NET and mod_mono do not support <system.webServer>.

You can set custom headers with Apache:

http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header

Header set Access-Control-Allow-Origin *

Robert



More information about the Mono-aspnet-list mailing list