Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not get useful http status in angulajs $http responseError method #10

Closed
bndynet opened this issue Sep 19, 2017 · 2 comments
Closed
Labels

Comments

@bndynet
Copy link
Owner

bndynet commented Sep 19, 2017

The below code about CORS does not generate Access-Control-* header in response. That will lead to get httpstatus -1 if request error.

  • @CrossOrigin
  • or override addCorsMappings(CorsRegistry registry) method in WebMvcConfigurerAdapter class.
    @Configuration
    @EnableWebMvc
    public class WebConfig extends WebMvcConfigurerAdapter {
    
        @Override
        public void addCorsMappings(CorsRegistry registry) {
            registry.addMapping("/**");
        }
    }
    
@bndynet bndynet self-assigned this Sep 19, 2017
@bndynet
Copy link
Owner Author

bndynet commented Oct 11, 2017

see commit

@bndynet bndynet closed this as completed Oct 11, 2017
@bndynet bndynet removed their assignment Dec 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant