Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Make IsAjaxRequest overridable or configurable #1169

@TomGroeneboer

Description

@TomGroeneboer

Hi guys,

We are using the Cookie authentication in our application. This application makes use of API requests (as you do) and therefore the redirect to a login page is silly on these requests. However, we do not use jquery in our front-end. This causes the non-standard header X-Requested-With not to be set and that causes the API calls to redirect to the login page.

If we want our API requests to return a 401 instead of the redirect, we need to override the behavior in the OnRedirectToLogin, OnRedirectToLogout, OnRedirectToAccessDenied and OnRedirectToReturnUrl events.

Could you please make the IsAjaxRequest method overridable or make the behavior configurable in another way?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions