Created
February 15, 2017 12:37
-
-
Save gokman/9e47ebc7ec48d5018ee6e5f45f4c7230 to your computer and use it in GitHub Desktop.
Angularjs - Custom Header Read Problem on Angularjs
This file contains hidden or 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
| @Configuration | |
| @EnableWebMvc | |
| public class WebConfig extends WebMvcConfigurerAdapter{ | |
| @Override | |
| public void addCorsMappings(CorsRegistry registry) { | |
| registry.addMapping("/**") | |
| .allowedOrigins("*") //access from all origin | |
| .exposedHeaders("Authorization"); //for reading Authorization header | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment