This project is read-only.

Missing header item for Cesium WebGL map


The symbol server does not support the Cesium WebGL-based mapping package. The problem appears to be a missing Access-Control-Allow-Origin header item - such as in the following.
              HttpListenerContext context = this.listener.GetContext();  // current line in Service.cs

                // This is typical of what Cesium wants to see.
                //HTTP/1.1 200 OK
                //Cache-Control: max-age=3600
                //Content-Type: image/png
                //Last-Modified: Thu, 16 May 2013 14:32:43 GMT
                //Accept-Ranges: bytes
                //ETag: "80f7b7394252ce1:0"
                //Server: Microsoft-IIS/8.0
                //X-UA-Compatible: IE=Edge,chrome=1
                //Access-Control-Allow-Origin: *
                //Date: Tue, 28 Jan 2014 14:37:23 GMT
                //Content-Length: 1005
                // So we'll  add some headers
                context.Response.AddHeader("Cache-Control", "max-age=518400, public");      // 6D * 24H * 60M * 60S
                context.Response.AddHeader("Content-Type", "image/png");
                context.Response.AddHeader("Access-Control-Allow-Origin", "*");             // this is the important one