Proxy question

Hello again! I’ll try to make this quick:

Only proxy I can find in B14 is in dojox/io/proxy… (Not sure this is what you recommend using).

I found Tools/proxy in your github and uploaded it to /proxy/ & /tools/proxy/ on my webserver with 0 results.

Got my hosting admin to enable CORS as per the website.

Cross-image errors across the board so I may as well use a proxy.

Do I need to use the build.xml in the root folder or the one in the proxy folder to add new domains?

Thank you!

  • Adam

Hi Adam,

Our proxy is in Tools/proxy, but it’s designed to work with the Jetty web server that comes with Cesium, so just uploading it to your web server is unlikely to work.

It’s probably worthwhile to figure out why your cross-origin headers aren’t working rather than using a proxy. What error are you getting exactly?

If you want to use the Cesium web server and proxy, you’ll need to modify the build.xml in the root folder, and then start the web server by running “ant runServer”.


Okay, thank you Kevin.

I figured it would take more than just copying the files in.

The header is where I’m getting confused.

I wasn’t sure if CORS needs to be enabled on every website I’m retrieving the overlays from or if I just need to include something like XMLhttprequest somewhere in my index.html…

Any chance you could show me where in the code I would put this header?

I’m confused as to where it should be placed…

Potentially in this somewhere?:


‘Single image’,

new Cesium.SingleTileImageryProvider({

url : ‘’,

extent : new Cesium.Extent(








Or would it be somewhere in the beginning of the code.

And while we’re on the topic, I understand adjusting the alpha value at the end of the js but besides making it 0.0, is there a way to not even have the checkmark checked in the table and the layer disabled on particular overlays?

Thank you for your help!


  • Adam

Okay I realize now that CORS needs to be abled on every server I access.

Therefore, with help, I was able to just create a simple .php proxy per image I need to overlay and it worked great!

If anyone else is having this issue (probably newbies like me),

Create a .php file in your root folder called overlay1.php and put only this code inside:

<?php header ("Content-Type: image/gif"); echo file_get_contents(''); (I trust you can use image/png instead of gif depending on the image type) Then use: url: ('/overlay1.php?') in your overlay code and it works! If only I knew it was that easy before 2 days of working with CORS. lol, - Adam