Last active
August 29, 2015 14:00
-
-
Save niko-dunixi/11107774 to your computer and use it in GitHub Desktop.
Spring MVC response header for X-UA-Compatible: IE=edge,chrome=1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RequestMapping(value = "/", method = RequestMethod.GET) | |
public String home(@RequestHeader("User-Agent") String userAgent, HttpServletResponse response) { | |
logger.info(userAgent); | |
if (userAgent.contains("MSIE")) { | |
logger.info("Adding response header for IE"); | |
response.addHeader("X-UA-Compatible", "IE=edge,chrome=1"); | |
} | |
return "home"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment