Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save gokman/9e47ebc7ec48d5018ee6e5f45f4c7230 to your computer and use it in GitHub Desktop.

Select an option

Save gokman/9e47ebc7ec48d5018ee6e5f45f4c7230 to your computer and use it in GitHub Desktop.
Angularjs - Custom Header Read Problem on Angularjs
@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