cors

Using a regular expression with CORS

我的梦境 提交于 2019-12-24 13:25:01
问题 I am trying to use a regular expression with cors. I have read many times that this is not possible that cors is all (*) or exact domains. Access-Control-Allow-Origin wildcard subdomains, ports and protocols . However this seems to contradict :http://www.cameronstokes.com/2010/12/26/cross-origin-resource-sharing-and-apache-httpd/. Could somebody clarify and if using a regular expression is possible provide a simple example as I have tried to implement the link above but with no success. The

IE11 XMLRequest Access is Denied

雨燕双飞 提交于 2019-12-24 12:44:17
问题 I tried to do a simple AJAX request on http://localhost:8080/ and I get an error right away when using IE 11. I don't think IE is even trying to send anything. Did somebody meet this issue? Here is a fiddle showing this behavior, html: <button id='btn1'>launch</button> onLoad: var xhr,btn=document.getElementById('btn1'); btn.onclick=onButton; var onReadyState=function(){ console.log('ready state:'+_xhr.readyState); if(xhr.readyState===4){ console.log('status:'+_xhr.status); } } function

Getting CORS error *only* on server exception calling ASP.NET Core Web API from Angular 6

风流意气都作罢 提交于 2019-12-24 12:31:47
问题 I have CORS in place and working. Meaning I get no CORS errors on GET or POST. My requests are all received on the server, and their responses are all received back on the client. That is, UNLESS an exception occurs in the Web API. Then, instead of getting the exception detail, I get the CORS error. So the client cannot see the exception details. Failed to load http://localhost:64630/api/sql/familiesCollection/create: No 'Access-Control-Allow-Origin' header is present on the requested

Symfony2 JWT Authentication Returning 404 on Preflight

南楼画角 提交于 2019-12-24 12:29:06
问题 I've just implemented the Symfony2 LexikJWTAuthenticationBundle, and when I attempt to authenticate a user, I keep getting the following response, XMLHttpRequest cannot load http://api.example.trunk/api/login_check. Response for preflight has invalid HTTP status code 404 What's weird, is that the request does work via Postman, and I get a token, so I'm thinking that this could have something to do with CORS? I have honestly googled and researched every possible thing I could think of, but I

What Access-Control-* headers to send back in response to CORS preflight OPTIONS request and then subsequent GET/POST/etc. request?

浪尽此生 提交于 2019-12-24 12:23:03
问题 I'm setting up a custom authorization workflow on API Gateway and looking for insights on CORS. I have an authorizer that returns an IAM role based on validation of a barertoken - that then invokes the lambda my target endpoint which returns the response as desired. I've made this work by adding my barer token to both the OPTIONS method and the GET / POST methods. In general, I'm adding most CORS headers to the OPTIONS + GET / POST / etc methods, but this seems superfluous. I'm a little

Hyperlinks to Ranges and Sheets in embedded Google Spreadsheet

寵の児 提交于 2019-12-24 12:21:55
问题 I need to add some navigation to a report made in Google Sheets. It has many sheets, and I added some hyperlinks so that the user can click them and quickly move to the relevant sheet or range. It works fine in the editor and if I share in view only mode, but I need to publish and embed it in a web page. When I embed it in an Iframe, the hyperlinks open a new browser tab always in the first sheet. The functions are like this: =HYPERLINK("#rangeid=706068501";"Link to Sheet 3") In this post:

cloud storage CORS

落爺英雄遲暮 提交于 2019-12-24 12:19:41
问题 I've exported a map from Google Earth Engine into a cloud storage bucket with public access (allUsers). The format in the bucket is map tiles with .png extensions. I've also set my CORS settings with gsutil as follows: [ { "origin": ["*"], "responseHeader": ["Authorization", "Content-Range", "Accept", "Content-Type", "Origin", "Range"], "method": ["GET"], "maxAgeSeconds": 300 } ] But trying to access these map tiles (with a Leaflet tileLayer) I get CORB (cross origin read blocking) errors in

Access-Control-Allow-Origin error for one user

匆匆过客 提交于 2019-12-24 11:36:01
问题 I have a WCF service hosted on the same server as another web app, but on a different port. The web app uses jQuery to perform get/post requests on the WCF service, and after configuring the WCF service to allow cross origin requests it works fine and as expected. One issue is having an issue where sometimes (not always), the requests don't work and after looking at the Chrome dev console the WCF service is throwing the below:g XMLHttpRequest cannot load {url}. No 'Access-Control-Allow-Origin

Cross-origin request blocked, origin 'null' no access

别等时光非礼了梦想. 提交于 2019-12-24 10:59:53
问题 I'm working on a project where I want to get my calendar events through google API, written in JS and using React. My question is why do I receive this error? I do receive my calendar events but beforehand this error pops up in the console of the web browser and I've tried it in firefox & chrome. Chrome err: https://gyazo.com/bf7687b094c24d0027bcbd4071783b8c Firefox err: https://gyazo.com/fa605bc75833d71070acbac34f1275da This is how my app.js looks like: https://gyazo.com

How to debug client side dart code in Dart editor without CORS

送分小仙女□ 提交于 2019-12-24 10:44:28
问题 I have a server / client project, both written in dart. Now my server starts on port 1337 and when I run my client with the Run in dartium , my static files are served on port 3030 which allows me to debug my client code in the Dart editor. The problem is that this causes CORS when using AJAX calls. I have properly setup my server to accept other origins (with Access-Control-Allow-Origin ) but, for example, cookies aren't sent along. Now I'm wondering: is there a way to serve my files with my