Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

How to set CSRF token to make a POST call via Destinations in HANA XS

$
0
0

I have a requirement where I would want to make a POST call to Gateway Service,which would need a CSRF token.

 

I fetch the CSRF token and then I use the same token during POST.

 

Hence i set this in $.request.headers() .

I know that I have to set the cookie as well for CSRF so I set the headers as

 

req.headers.set("Cookie","'sap-XSRF_GIQ_100=TQRYJKzJSH8SknthcwRQFA%3d%3d20140425093233hxBe2w9qL9AjCtnh3gsIvPP6-IwsfZB2lqE5RtfGH8A%3d'")

 

But this fails with CSRF token validation

 

I found that the cookie value is not set in the service.

 

How are cookies handled in  Hana how can i set my csrf and XSRF-Token cookie value in the request

 

Thanks,


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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