Reading response headers when using $http of Angularjs

后端 未结 2 1468
悲&欢浪女
悲&欢浪女 2020-11-27 15:51

I am using $http to make an api call which is sending some custom header like X-Foo. However I can\'t yet figure out how to read them. Inside the <

2条回答
  •  被撕碎了的回忆
    2020-11-27 16:21

    Spring 4.0+ provide @CrossOrigin annotation which has following parameters

    1. origins = list of Comma separated origin.
    2. exposedHeaders = list ofcomma separated count custom parameters.

    example

    @CrossOrigin(origins = "*", exposedHeaders ="X-Total-Count")
    

提交回复
热议问题