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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -