setcookie

Log in value from Set-Cookie header in nginx

喜夏-厌秋 提交于 2019-12-05 22:37:05
Is it possible to write in nginx access log value of key 'uuid' from Cookie for server response (header: Set-Cookie)? $cookie_uuid - return uuid that sent client $sent_http_set_cookie - return whole header Set-Cookie: 'uuid=897587e7-a733-422f-9daa-b3105a5895aa; domain=domain.com; path=/; expires=Tue, 09-Aug-2033 01:17:54 GMT', but I need save only value for key 'uuid' Thanks map $sent_http_set_cookie $resp_uuid { ~*uuid=(?<u>[0-9a-f-]+) $u; } Reference: http://nginx.org/r/map man pcresyntax 来源: https://stackoverflow.com/questions/18138503/log-in-value-from-set-cookie-header-in-nginx

AWS API Gateway : Use 302 redirect and set-cookie header

心已入冬 提交于 2019-12-05 15:20:47
I used AWS API Gateway to redirect in response. simple flow : aaa.com ====> API Gateway & Lambda ==[302 redirect]==> bbb.com It worked well when following the blog . However, I couldn't set cookie at bbb.com . I followed the blog and defined another “Set-Cookie” header. My Lambda code snippet listed below. context.succeed({ location : "http://192.168.173.193:3030", setCookie: "path=/;sessionID=1234;domain=null;" }); Did you update your Response Parameters? In that blog post notice the responseParameters section of the Swagger Example. responseParameters: method.response.header.Location:

Set a cookie to save login details PHP

泄露秘密 提交于 2019-12-05 01:30:29
问题 I have a typical login (username, password) and also want to include a 'save my details' check box. The login form Posts its values to login_script.php and if the login is successful, the user is redirected to the main page of the site. I'm tying to use this method to save the login details //Remember Me Function if(isset($_POST['remember_me'])){ // Set a cookie that expires in 24 hours setcookie("username",$username, time()+3600*24); setcookie("password",$password, time()+3600*24); } Now

How to set different cookies for different instances of Chromium embedded browser

血红的双手。 提交于 2019-12-04 10:54:34
I'm working on an application that requires multiple embedded instances and each of this instance logins to the same external site with different authentication details. I'm using CEF (Chromium embedded framework ) in Delphi , I have a folder that i stored the cookies on it for different instance of my browsers , So i have this code in the first unit procedure TForm2.Button1Click(Sender: TObject); begin form33 := Tform3.Create(nil); form33.Show; end; when the form33 created procedure TForm3.FormCreate(Sender: TObject); var CookieManager: ICefCookieManager; folder: string; begin Randomize;

Cookies - set across multiple domains

梦想的初衷 提交于 2019-12-04 08:28:57
问题 My company has a setup as follows: subdomain1.domain1.com subdomain2.domain1.com subdomain3.domain1.com subdomain4.domain1.com subdomain5.domain1.com subdomain6.domain1.com subdomain1.domain2.com subdomain2.domain2.com subdomain3.domain2.com subdomain4.domain2.com subdomain5.domain2.com subdomain6.domain2.com On each site, bearing in mind there can be a hundred sites per subdomain, users can log in. We, as developers, have to test frontends across several browsers, but some work may only be

How to make a cookie with PHP [duplicate]

徘徊边缘 提交于 2019-12-04 05:41:21
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: How to set cookies for uuid Hello, I would like to know how to make a cookie in PHP. I have researched the topic for a couple of hours already, yet im a newbie to PHP and dont understand it that much. I have found this script, but dont know how to implant it into my website, can anyone help? setcookie(name, value, expire, path, domain); 回答1: What do you want to do with your cookie? If you want to track

My cookies are only available on PHP pages they are set on, is this normal?

不羁的心 提交于 2019-12-04 05:10:15
I cannot access cookies from any page other than the page they are set on. I looked at print_r($_COOKIE) on different pages and the only common variable between pages is the $_COOKIE['PHPSESSID'] . I am developing on a local XAMPP testing server. Is there a setting I should change on the PHP.ini or is this normal behavior for cookies? Sorry, I'm a little new to this stuff and I was under the impression cookies were accessible site wide. I am setting cookies like: setcookie("user", "Dave Schmave", time()+60*60*24*120); Any help would be greatly appreciated. Thanks Try setting the cookie path to

Why does Chrome ignore Set-Cookie header?

大憨熊 提交于 2019-12-04 03:39:40
Chrome has a long history of ignoring Set-Cookie header. Some of these reasons have been termed bugs and fixed, others are persistent. None of them are easy to find in documentation. Set-Cookie not allowed in 302 redirects Set-Cookie not allowed if host is localhost Set-Cookie not allowed if Expires is out of acceptable range I am currently struggling with getting chrome to accept a simple session cookie. Firefox and Safari seem to accept most any RFC compliant string for Set-Cookie. Chrome stubbornly refuses to acknowledge that a Set-Cookie directive was even sent on the request (does not

Safari 11 X-XSRF-TOKEN not updated after refresh

二次信任 提交于 2019-12-03 13:27:22
Recently Safari 11 was released on Mac OSX. This update causes problem with our webapplication in combination with XSRF on the header of our reuest. I will try to describe the problem in a logic way. This is how a good situation would look like: When a user wants to log in, he receives a response from the server with a Set-Cookie that contains the value of the XSRF token. Eg: Set-Cookie: XSRF-TOKEN=LKNBX4DZhL708KjXNkgXnlxTDCNuhsZG1kTc2SFy498; Path=/; Secure The page refreshes The next call that will be executed contains that correct XSRF value in the header. On the server side the value is

PHP Curl and setcookie problem

别来无恙 提交于 2019-12-03 12:15:54
问题 I have a curl script that acts as proxy between client and main server. ...... $field_array= array( 'Accept' => 'HTTP_ACCEPT', 'Accept-Charset' => 'HTTP_ACCEPT_CHARSET', 'Accept-Encoding' => 'HTTP_ACCEPT_ENCODING', 'Accept-Language' => 'HTTP_ACCEPT_LANGUAGE', 'Connection' => 'HTTP_CONNECTION', 'Host' => 'HTTP_HOST', 'Referer' => 'HTTP_REFERER', 'User-Agent' => 'HTTP_USER_AGENT' ); $curl_request_headers=array(); foreach ($field_array as $key => $value) { if(isset($_SERVER["$value"])) { $server