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

Add Access-Control-Expose-Headers for ABP error response #1587

Closed
hikalkan opened this issue Aug 5, 2019 · 1 comment · Fixed by #1591
Closed

Add Access-Control-Expose-Headers for ABP error response #1587

hikalkan opened this issue Aug 5, 2019 · 1 comment · Fixed by #1591
Assignees
Milestone

Comments

@hikalkan
Copy link
Member

hikalkan commented Aug 5, 2019

@mehmet-erim says "I can't handle "_AbpErrorFormat" header". It seems we should add Access-Control-Expose-Headers to allow it. See https://stackoverflow.com/questions/51971342/cant-get-headers-of-response-in-angular-5?answertab=active#tab-top

For the simplest solution, we can modify this Access-Control-Expose-Headers header (or add if it does not exists) to add _AbpErrorFormat to the list. We can do this where we return the error response.

@maliming
Copy link
Member

maliming commented Aug 6, 2019

Asp Net Core CORS middleware provides an option to set Access-Control-Expose-Headers.

We should use it directly. Of course this only works when using CORS.
@hikalkan What do you think?

Https://docs.microsoft.com/en-us/aspnet/core/security/cors?view=aspnetcore-2.2#set-the-exposed-response-headers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants