Base solution for your next web application
Open Closed

Angular 4 version and AntiForgery tokens #3429


User avatar
0
joe704la created

Is the Angular 4 version setup to send Antiforgery token with the PUTs, POSTs, and DELETEs? I was watching the posts in the dev tools and I do not see any Antiforgery token.


5 Answer(s)
  • User Avatar
    0
    joe704la created

    Does anyone have any ideas on this one?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Angular 4 does not set anti-forgery tokens because it is not needed. Angular4 client and host application are two different applications.

    Why do you need it ? Can you explain a bit more ? Maybe we can offer you something.

    Thanks.

  • User Avatar
    0
    joe704la created

    Basically I wanted to make sure nothing else was making requests to the API but the Angular app.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    This is done with Cors setting. You can only allow specific url's to make request to your API.

    If you want to block non browser apps, you should do it manually I think.

    Thanks.

  • User Avatar
    0
    joe704la created

    Okay great, thank you