How to set cookies to POST ?
-
I need to set custom cookie on post in order to pass perimeterx security, how to do it?
-
@gudolik said in How to set cookies to POST ?:
I need to set custom cookie on post in order to pass perimeterx security, how to do it?
BAS has its own cookie format and only works with it.
-
@Fox
Is that mean we cant set cookies on HTTP requests?
-
@gudolik You can if you are familiar with js
-
@UserTrue so that will work ?
function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+ d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; }
-
@gudolik No, you should look at what the cookies format looks like in BAS (JSON) and do the same.
-
@UserTrue said in How to set cookies to POST ?:
@gudolik No, you should look at what the cookies format looks like in BAS (JSON) and do the same.
so there no simple way to set cookies? I need to create json in BAS cookie format which is really hard to do with dynamic data...
-
@UserTrue said in How to set cookies to POST ?:
@gudolik No, you should look at what the cookies format looks like in BAS (JSON) and do the same.
I did tried in BAS (JSON) format but in this way deletes other cookies which is not an option. Please someone help with that question :)