cross-domain

Cookies are not accessible within JavaScript (and the dev tools) but sent along with XHR request (no httponly used)

时光怂恿深爱的人放手 提交于 2020-08-24 05:44:32
问题 I'm using both a front-end and a back-end application on a different domain with a session-based authorization. I have setup a working CORS configuration, which works as expected on localhost (e.g. from port :9000 to port :8080 ). As soon as I deploy the applications on secure domains (both domains only allow HTTPS), the CSRF cookie is not accessible anymore within JavaScript, leading to an incorrect follow-up request of the front-end (missing the CSRF header). The cookie is set by the back

Flask-socketio - failed to set “Access-Control-Allow-Origin” response header

寵の児 提交于 2020-08-10 01:15:46
问题 I wrote this simple flask-socketio code: from flask import Flask from flask_socketio import SocketIO, send app = Flask(__name__) app.config['SECRET_KEY'] = 'mysecret' socketio = SocketIO(app) @socketio.on('message') def handle_message(msg): print 'Message:' + msg send(msg, broadcast=True) if __name__ == '__main__': socketio.run(app) When I see chrome network analyzing, I can see the "Access-Control-Allow-Origin" value as null . According to Flask-socketio documentation: (See API Reference @

Flask-socketio - failed to set “Access-Control-Allow-Origin” response header

不想你离开。 提交于 2020-08-10 01:13:29
问题 I wrote this simple flask-socketio code: from flask import Flask from flask_socketio import SocketIO, send app = Flask(__name__) app.config['SECRET_KEY'] = 'mysecret' socketio = SocketIO(app) @socketio.on('message') def handle_message(msg): print 'Message:' + msg send(msg, broadcast=True) if __name__ == '__main__': socketio.run(app) When I see chrome network analyzing, I can see the "Access-Control-Allow-Origin" value as null . According to Flask-socketio documentation: (See API Reference @

How do i implement ‘sign in with google’ on my site?

拥有回忆 提交于 2020-07-31 06:25:11
问题 On my site I would like to allow users to sign in with a google account. I plan to use openid but I would like to allow signing in with google because it has more benefits. I've noticed in the past a few sites that have the ability to sign in with a google (gmail) account and IIRC though they did NOT support openID (but I could be wrong). How do I implement 'sign in with google' ? 回答1: If you plan to use OpenID, use that. Google is already an OpenID 2.0 provider. Google's OpenID provider is