SAP Geteway 403 CSRF error

In the SAP Gateway, perform the post, put, delete operation, the 403 error.

The reason is because when operating a server data is modified, it is necessary to provide the token to authenticate the client.

The solution is to get in the operation, " : the X-Token-CSRF-Fetch" adding http header, gets the token, when the same post during other operations, the acquired token value, into the http header in.

Can refer  https://blogs.sap.com/2014/07/11/issues-with-csrf-token-and-how-to-solve-them/  blog post is set, in the following also provides comment Some other problems encountered.

 

After I set the token, is also not easy, I guess because the request is not twice in the same session occurred, should probably get in get in cookies, and put the request in the post,

You can solve this problem, but has not been verified.

Guess you like

Origin www.cnblogs.com/suoluo119/p/11411281.html