Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 700

How do I send spring csrf token from Postman rest client?

$
0
0

I have csrf protection in spring framework. So in each request I send csrf token in header from ajax call, which is perfectly working.

<meta name="_csrf" content="${_csrf.token}"/><meta name="_csrf_header" content="${_csrf.headerName}"/>var token = $("meta[name='_csrf']").attr("content");var header = $("meta[name='_csrf_header']").attr("content");

In ajax

beforeSend: function(xhr) {                xhr.setRequestHeader(header, token),                xhr.setRequestHeader("username", "xxxx1"),                xhr.setRequestHeader("password", "password")            }

I haven't any idea to generate csrf token and include in header section of Postman Rest Client ? Would you please help me to send csrf token from Postman Rest Client? enter image description here


Viewing all articles
Browse latest Browse all 700

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>