How to configure Spring Security to send 'X-CSRF-TOKEN'?

前端 未结 2 957
天涯浪人
天涯浪人 2021-02-05 17:24

The problem is to get the CSRF tokens working between Spring Security and Angular.

Spring Security CSRF Token Interceptor for Angular seems like something that should do

2条回答
  •  野的像风
    2021-02-05 18:04

    I am answering the question myself as there was a hidden one in the original GitHub repository: Issue #1.

    The solution was to add a couple of lines of Java code that adds the CSRF parameters as Http message headers.

    I added a working solution to the GitHub repo with Tag v.2.0.

提交回复
热议问题