public void CheckCorsPopulatedCorrectly()
    {
        var headers = new ServerResponseHeaders();

        headers.SetCors(CorsHeader.BuildHeader("*"));
        Assert.AreEqual("*", headers.Cors);

        headers.SetCors(CorsHeader.BuildHeader("http://localhost:2019/test"));
        Assert.AreEqual("localhost:2019", headers.Cors);

        headers.SetCors(CorsHeader.BuildHeader("http://www.google.com"));
        Assert.AreEqual("www.google.com", headers.Cors);
    }
 static ExceptionHandler()
 {
     Headers = new ServerResponseHeaders();
     Headers.SetCors(CorsHeader.BuildHeader("*"));
 }
示例#3
0
 public VideoController()
 {
     Headers.SetCors(CorsHeader.BuildHeader("*"));
 }