cross-domain

How can I override javascript files referenced with the crossorigin=“anonymous” using a Google Chrome extension?

走远了吗. 提交于 2020-01-04 08:17:13
问题 In the response HTML of a website, with a domain like http://www.example.com , there are many javascript files referenced. One of them references a javascript file on a different domain, and this script tag has the crossorigin="anonymous" attribute set: <script crossorigin="anonymous" src="//cdn.example.net/script.js"></script> I've attempted to redirect the request to another url using a Google Chrome extension: chrome.webRequest.onBeforeRequest.addListener(function(info) { return {

How does same-domain policy apply to background scripts (NON-content scripts) in Firefox and Chrome extensions?

本小妞迷上赌 提交于 2020-01-04 06:36:06
问题 To my understanding, there are two types of scripts in an extension, one is "content scripts" that run from, and interact with DOM in webpages, which are governed by the same origin policy; the other are scripts, call them "extension scripts" , that run in the background and may or may not interact with webpages, like main.js in Firefox or background.js in Chrome. Here is Google's explanation for extension scripts "...have a single long-running script to manage some task or state ...the

React Native with reCATPCHA

Deadly 提交于 2020-01-04 05:58:09
问题 I'm trying to implement the google reCAPTCHA in my react native app. I'm using a wrapped webview. <WebView javaScriptEnabled={true} mixedContentMode={'always'} style={{height: 200}} source={{ html: this.getWebviewContent() }}/> getWebviewContent(){ var originalForm = '<!DOCTYPE html><html><head><script src="https://www.google.com/recaptcha/api.js"></script></head><body><form action="[POST_URL]" method="post"><input type="hidden" value="[TITLE]"><input type="hidden" value="[DESCRIPTION]">

Cross-Domain Ajax Calls and maintaining session on Google App Engine

纵然是瞬间 提交于 2020-01-04 02:44:11
问题 I have recently worked through a bunch of kinks making cross-domain ajax calls to a GAE app and it is working beautifully, however, I am trying to set an http session id when making said service call and it is working fine, except that every time I perform the request, the session is null again. I'm assuming that this is because an ajax call and not making the request over http? How can I go about this? 回答1: Session tracking is usually done with cookies. If you are using Cross-Origin Resource

same session, different domains, set session id

时光总嘲笑我的痴心妄想 提交于 2020-01-03 20:00:08
问题 I have a couple of domains which i want to shere sessions. I have created a method like this: The user login is done in a central place and the sessions are saved in the database. Lets say the user A wants to go to abc.com domain. My app redirects it to the main authentication domain where he logs in. After login is generated an auth token which is saved in a field in the sessions table and it is pass back to the abc.com application. There I use the auth_token to get the session_id from the

How can i get the hash value from an iframe src?

我与影子孤独终老i 提交于 2020-01-03 17:13:12
问题 My iframe is having a url with a hash value when i do iframe.src it just gives me the url without the hash appended to it from the other domain. Can i read the entire url with the hash. 回答1: Not likely due to security constraints - I am surprised you can even get the URL Can you show the code? Sounds like a duplicate of How to get iframe contentWindow height in cross domain 回答2: var contentWnd = $('iframe').attr('contentWindow'); var hash = contentWnd.window.location.hash; Adaptation of this

Cross domain javascript to access localhost. Possible?

亡梦爱人 提交于 2020-01-03 15:50:11
问题 for one reason or another I need for javascript to access a webserver on the localhost. This localhost webserver is under our control so we can have whatever software running in it. How would you do this? I've seen things like YQL but this accesses another domain from the internet . This kind of access causes a lot of problems with firewalls and such. So I want to access the same computer that the browser is running on. How would you do this with javascript and whatever software running on

Angular Js Routing Google Chrome Issue

こ雲淡風輕ζ 提交于 2020-01-03 08:58:09
问题 Worked on basic routing in angular Js with Code1 mentioned below and getting " XMLHttpRequest cannot load Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https, chrome-extension-resource " error and founded that we must use local web server to resolve the same and downloaded MAMP and kept my html[login.html] in htdocs folder started the server and replaced templateUrl with [localhostURL/AngularJs/login.html'] as mentioned in Code2 and getting error

Angular Js Routing Google Chrome Issue

混江龙づ霸主 提交于 2020-01-03 08:58:06
问题 Worked on basic routing in angular Js with Code1 mentioned below and getting " XMLHttpRequest cannot load Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https, chrome-extension-resource " error and founded that we must use local web server to resolve the same and downloaded MAMP and kept my html[login.html] in htdocs folder started the server and replaced templateUrl with [localhostURL/AngularJs/login.html'] as mentioned in Code2 and getting error

NodeJS-socket.io getting “Access is Denied” Exception

纵饮孤独 提交于 2020-01-03 05:52:47
问题 I have a node (0.6.11)/socket.io(0.9.0) application that runs well in FF but IE8 throws JS exceptions: Access is denied in socket.io.js (line 2561): req.open(method || 'GET', this.prepareUrl() + query, true); a few lines before that, req is defined as req = io.util.request(this.socket.isXDomain()) This suggests it is a cross domain issue, but I'm doing it locally all the way. Plus FF has no issues. What could be the cause? . Here's the source code: SERVER: var app = require('express')