cross-domain

When tried to convert to base64 from url - getting CORS Issue in JS

浪尽此生 提交于 2020-07-28 05:05:52
问题 when i tried to convert image url to base64 am getting CORS issue. Not sure what exactly need to do to get rid of this CORS issue my code look like this function toDataURL(url, callback) { var xhr = new XMLHttpRequest(); xhr.onload = function() { var reader = new FileReader(); reader.onloadend = function() { callback(reader.result); } reader.readAsDataURL(xhr.response); }; xhr.open('GET', url); xhr.responseType = 'blob'; xhr.send(); } toDataURL('https://www.dropbox.com/******/gradient-test

How does Access-Control-Allow-Origin header work?

隐身守侯 提交于 2020-07-04 04:23:03
问题 Apparently, I have completely misunderstood its semantics. I thought of something like this: A client downloads javascript code MyCode.js from http://siteA - the origin . The response header of MyCode.js contains Access-Control-Allow-Origin: http://siteB , which I thought meant that MyCode.js was allowed to make cross-origin references to the site B. The client triggers some functionality of MyCode.js, which in turn make requests to http://siteB , which should be fine, despite being cross

How does Access-Control-Allow-Origin header work?

坚强是说给别人听的谎言 提交于 2020-07-04 04:21:53
问题 Apparently, I have completely misunderstood its semantics. I thought of something like this: A client downloads javascript code MyCode.js from http://siteA - the origin . The response header of MyCode.js contains Access-Control-Allow-Origin: http://siteB , which I thought meant that MyCode.js was allowed to make cross-origin references to the site B. The client triggers some functionality of MyCode.js, which in turn make requests to http://siteB , which should be fine, despite being cross

CORS, withCredentials and third party cookies

一笑奈何 提交于 2020-06-27 11:49:17
问题 I'm trying to do a CORS GET that sends the cookie along with it. I've set all the headers ( access-control-allow-origin , access-control-allow-credentials , access-control-allow-headers ) in the server and am using withCredentials: true and crossDomain: true in the jquery ajax request. Everything works when I tell my browser to allow third-party cookies. Is there any way to do this without forcing visitors to allow third party cookies? I've even tried redirecting the user and redirecting back

D3.js - load csv file from chrome

馋奶兔 提交于 2020-06-27 08:49:10
问题 I 've got a webProject with dc.js (d3.js+crossfilter.js) and ndx.csv file. When i run project into chrome from visual studio, everythings is Ok. Now after build project and copy in other computers, Run that. The problem is here . When i try to run webProject [html file] in other computers with Chrome , this browser has error " XMLHttpRequest cannot load file:///C:/Users/9901/Desktop/WebSite1/ndx.csv. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome

Sharing cookies across .test sub-domains in Safari 13 not possible

懵懂的女人 提交于 2020-05-28 12:00:49
问题 I have a self-certificate for apache for https://example.test & https://m.example.test When browsing https://m.example.test cookies are set to the base domain '.example.test' using php 'session.cookie_domain'. This DOES work in Chrome, Firefox or Safari up-to-version-12. However, it does not work anymore in Safari 13 (iOS 13 or Catalina). What's even more strange is that the cookie is still set to the base domain on Safari 13 with my production machine for https://example.COM & https://m

Sharing cookies across .test sub-domains in Safari 13 not possible

扶醉桌前 提交于 2020-05-28 11:59:50
问题 I have a self-certificate for apache for https://example.test & https://m.example.test When browsing https://m.example.test cookies are set to the base domain '.example.test' using php 'session.cookie_domain'. This DOES work in Chrome, Firefox or Safari up-to-version-12. However, it does not work anymore in Safari 13 (iOS 13 or Catalina). What's even more strange is that the cookie is still set to the base domain on Safari 13 with my production machine for https://example.COM & https://m

CORS Api with symfony

你说的曾经没有我的故事 提交于 2020-05-27 01:55:32
问题 I should make cross domain API with Symfony. There is some bundle for that? I have tried FOS Rest Bundle but did not seem have solved my problem. 回答1: I advise you to use NelmioCorsBundle: https://github.com/nelmio/NelmioCorsBundle This bundle allows you to send Cross-Origin Resource Sharing headers with ACL-style per-URL configuration. Is very useful for CORS problem 回答2: I'm not sure that's the right way, but I resolved for me: 1) Create new event subscriber (like ResponseSubscriber ) 2)

CORS Api with symfony

元气小坏坏 提交于 2020-05-27 01:55:27
问题 I should make cross domain API with Symfony. There is some bundle for that? I have tried FOS Rest Bundle but did not seem have solved my problem. 回答1: I advise you to use NelmioCorsBundle: https://github.com/nelmio/NelmioCorsBundle This bundle allows you to send Cross-Origin Resource Sharing headers with ACL-style per-URL configuration. Is very useful for CORS problem 回答2: I'm not sure that's the right way, but I resolved for me: 1) Create new event subscriber (like ResponseSubscriber ) 2)

Set-Cookie header not working across domain

耗尽温柔 提交于 2020-05-15 08:12:30
问题 I am on a website https://aaa.shared.com . This website (call it A ) sends an xhr request to url https://zzz.shared.com/some/path (website Z ) and receives a response with the following headers: access-control-allow-credentials: true access-control-allow-origin: aaa.shared.com set-cookie: foo=bar; expires=Fri, 01 Jan 2100 00:00:00 GMT; path=/; secure; samesite=none; httponly (I followed answer on this question to add access-control headers) Now, what I would expect is that whenever I am on