更新时间:2023-02-16 23:32:43
尝试添加响应对象作为返回值,在这里你可以设置标题..
响应对象
Try to add Response Object as your return value where you can set Headers..
Response Object
Response.ok(/* some entity */).header("CustomHeader", "CustomValue").build();
您不需要使用拦截器
如何自定义HTTP标头添加到JAX-RS的反应?
将响应标头添加到JAX-RS Webservice
将 http 标头添加到 Angular 应用程序中的 window.location.href
在 Angular 应用程序中将 http 标头添加到 window.location.href
如何将授权标头添加到Angular http请求?