Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to add a response header to the Jetty configuration the following command,

Access-Control-Allow-Origin: *

Ok so this Jetty webserver is the base on which Geoserver is running. I asked this question in the GIS forum but no one was able to answer it so I felt I might get the answer here. I wish to add this response to the header to remove the error

Unable to load XMLHttpRequest

I wish to know that under which tags should I wrap this response header and where in the file should I save it.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

My preference is to add headers in a proxying web server. If you have Apache HTTP infront of your Jetty instance then use the Header directive.

In answer to the question, to perform this purely in Jetty see setting-http-headers-with-jetty

share|improve this answer
    
thanks that is what I did –  Sam007 Oct 7 '12 at 16:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.