cookies

Jquery Ajax CORS + HttpOnly Cookie

感情迁移 提交于 2020-01-12 03:16:09
问题 I have got CORS working on my current project, although one thing I cannot seem to get working correctly is the cookies. Now I get the cookie fine, the server issues it and sends it down and firefox accepts it, I can see it in the firebug cookies section. However when I make subsequent calls to that service it doesnt seem to send the cookie in the header... GET /some/entity/ HTTP/1.1 Host: localhost:1837 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0 Accept

Accessing the “session key” cookie name from anywhere in Rails

落花浮王杯 提交于 2020-01-11 18:52:46
问题 We are building a plugin for Rails to be used within iframe Facebook applications, and at one point we need to check if Rail's session id cookie as been set or not. By default, this cookie is named _myprojectname_session , what we need to find out is the actual name of the cookie itself. So if it's not set, we can do some redirects to make sure the cookies are set. How do we access the damn name of the cookie from anywhere? Or at least from within a controller? 回答1: Rails.application.config

Accessing the “session key” cookie name from anywhere in Rails

╄→гoц情女王★ 提交于 2020-01-11 18:52:05
问题 We are building a plugin for Rails to be used within iframe Facebook applications, and at one point we need to check if Rail's session id cookie as been set or not. By default, this cookie is named _myprojectname_session , what we need to find out is the actual name of the cookie itself. So if it's not set, we can do some redirects to make sure the cookies are set. How do we access the damn name of the cookie from anywhere? Or at least from within a controller? 回答1: Rails.application.config

Mobile Redirect to desktop version using htaccess

送分小仙女□ 提交于 2020-01-11 14:06:23
问题 I have a website called www.example.com I have a mobile website called m.example.com firstly i want to redirect automatically from desktop version to mobile site (if it is mobile only.. i want to detect all mobile versions) then I want to use an htaccess to automatically redirect the main website URL to the mobile version.. However, there is a link on the mobile version that points back to the main website called www.example.com/?nm=1 ( nm mean nomobile ) i want to set cookie for this one..

Laravel sessions without cookies

你说的曾经没有我的故事 提交于 2020-01-11 11:28:09
问题 I have an application which allows user to log in and add items to basket, however if user has cookies turned off, this functionality would no longer work. I've checked facebook and it turns out even they need cookies enabled to function. So my question is is it even possible to handle regular login/add to cart functionality without cookies? 回答1: This is not only Laravel specific. Check http://php.net/manual/en/session.configuration.php (specifically session.use_cookies and session.use_only

Why am I getting “Internal Server Error” running two Odoo instances (same domain but different ports)?

偶尔善良 提交于 2020-01-11 08:43:28
问题 I have two instances of Odoo in a server in the cloud. If I make the following steps I get "Internal Server Error": I make login in the first instance ( http://111.222.33.44:3333 ) I close the session I load the address of the second instance in the same browser ( http://111.222.33.44:4444 ) If I want to work in the second instance (in another port), I need to remove the browser cookies first to acces to the other Odoo instance. If do this everything works fine. If I load them in differents

Fake a cookie to scrape a site in python

拜拜、爱过 提交于 2020-01-11 07:04:09
问题 The site that I'm trying to scrape uses js to create a cookie. What I was thinking was that I can create a cookie in python and then use that cookie to scrape the site. However, I don't know any way of doing that. Does anybody have any ideas? 回答1: Please see Python httplib2 - Handling Cookies in HTTP Form Posts for an example of adding a cookie to a request. I often need to automate tasks in web based applications. I like to do this at the protocol level by simulating a real user's

Angular 2 doesn't save my Authentication Cookie with CORS

*爱你&永不变心* 提交于 2020-01-11 06:41:09
问题 I have an angular 2 app which should authenticate to a Node Express backend where it sends an login request to the backend and receives a cookie. It should send this cookie with every consecutive request (which it does not). I have in my angular app: class LoginService private requestOptions = new RequestOptions({headers: this.headers, withCredentials: true});` login(username: string, password: string): Promise<boolean> { return this.http.post(this.myUrl + "login", JSON.stringify({username

Use Google Firebase Authentication without 3rd Party Cookies

元气小坏坏 提交于 2020-01-11 05:48:06
问题 I'm currently experimenting with Social Media Sign-in and have realised something slightly strange on how these logins are delivered which is stemming from the fact that my workplace, like most offices, blocks 3rd party cookies as a security policy. Google Firebase Authentication uses 3rd party cookies and so if I try to use Firebase, I'm redirected to the Google page (as expected) but when I'm redirected back to the originating webpage after logging in (and Firebase tries to set cookies), I

Sharing a session between 2 laravel applications

佐手、 提交于 2020-01-11 05:26:07
问题 I am using a database session driver in an attempt to share a session between two laravel applications. Should the session cookie name and encryption key be the same for both applications? I am having a very hard time with this issue for the last few days. Any help is greatly appreciated. Thank you! 回答1: Everything related to sessions should be identical. Basically the session.php file should be the same between both, they should have a common database, and the key and cipher type should be