java - Spring mvc converting json response links to https -
i have spring mvc rest service returns json response (gson serialized) . response contains nodes specific link example :
{ link : "http://www.test.com"}
when access service using http it's fine , when accessing service through https links in result converted https
{ link : "https://www.test.com"}
any idea?
full example:
@requestmapping(value = "/test",method = {requestmethod.get,requestmethod.options}, produces = "application/json;charset=utf-8") @responsebody public string gettest(@pathvariable("id") string id, model model, httpservletrequest request, httpservletresponse response) { response.setheader("access-control-allow-origin", "*"); string test = "{ link : \"http://www.test.com\"}"; return test; }
i had issue before , after searching full day not find solution. did work around remove protocol link url in json response before returning it.
Comments
Post a Comment