I have created a plugin which sends json data back I am getting an error when accessing from jquery cross-origin resource sharing saying that request is coming from another domain . I used jsonp but cannot use application/javascript or MediaType.TEXT_HTML as the server is throwing a 500 error saying this format is not supported
Is there any way to bypass CROS with either setting in JIRA or jquery
Got it need to set the
contentType ="application/x-www-form-urlencoded; charset=utf-8"
and set
response.setHeader("Access-Control-Allow-Origin", "*");
response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
response.setHeader("Access-Control-Max-Age", "3600");
response.setHeader("Access-Control-Allow-Headers", "x-requested-with");
in server
Where do I have to set response.Header.... in server? Can you describe it more specific?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.