cors

Jhipster CORS enable

天涯浪子 提交于 2021-01-28 03:11:18
问题 I am using Jhipster to generate API. My api is on lets call it : https://api.staging.test.com/ and my FE app is on : https://staging.test.com/ Here is my config for Cors enable in application-prod.yml cors: allowed-origins: "https://staging.test.com/" allowed-methods: "*" allowed-headers: GET, PUT, POST, DELETE, OPTIONS exposed-headers: "Authorization,Link,X-Total-Count" allow-credentials: true max-age: 1800 I still get this error : Response to preflight request doesn't pass access control

aws s3 with html2canvas - CORS issue with multiple browsers

不羁岁月 提交于 2021-01-28 02:39:32
问题 I knew many questions and issues have been already made. But I can't find out clear answer to solve this issue. I use html2canvas to screenshot my page - with image from amazon s3 (cloudfront, too) I tried almost every answer from SO and html2canvas issues. I setup my S3 CORS to allow all / also set my bucket to public. Also I gave all public access to Everyone (Just to test if it works. I will block them after deploy) Here's my CORS for s3 <?xml version="1.0" encoding="UTF-8"?>

Chrome cancels CORS XHR when redirected

試著忘記壹切 提交于 2021-01-28 01:52:41
问题 I'm having a mysterious issue where Chrome cancels cross-origin AJAX requests when they encounter a HTTP redirect. In the Network tab, it appears as "(canceled)" and the response headers or body are not available. Here's the flow: Load page on http:// POST request to login endpoint on https:// 303 response Request canceled. Here's the JS (from ajaxtest.html ): var r = new XMLHttpRequest(); r.open('POST', 'https://dev.example.com/appName-rest/login', true); r.setRequestHeader('Content-Type',

Cross-Origin Request Blocked when requesting Paypal sandbox but a different localhost port works fine

匆匆过客 提交于 2021-01-28 00:47:37
问题 I'm having trouble understanding why I'm getting a Cross-Origin Request Blocked error when trying to send a user in my app to a sandbox.paypal.com payment page when ordering a product. The frontend of my app (with React) uses localhost port 3000 while the backend uses localhost port 4000. The communication between the two ports when performing CRUD operations works as intended. But now that I'm introducing paypal into the mix the app doesn't go to the sandbox paypal page when trying to order

aws s3 with html2canvas - CORS issue with multiple browsers

烈酒焚心 提交于 2021-01-27 22:50:53
问题 I knew many questions and issues have been already made. But I can't find out clear answer to solve this issue. I use html2canvas to screenshot my page - with image from amazon s3 (cloudfront, too) I tried almost every answer from SO and html2canvas issues. I setup my S3 CORS to allow all / also set my bucket to public. Also I gave all public access to Everyone (Just to test if it works. I will block them after deploy) Here's my CORS for s3 <?xml version="1.0" encoding="UTF-8"?>

Angular/C# CORS Issue

妖精的绣舞 提交于 2021-01-27 21:27:27
问题 I hosted my client on localhost:8080/ and server on localhost:44302/ I am trying to link to my backend, but I am getting CORS issue. Below is my Angular http request $http.post(url, data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'POST, OPTIONS' } }).success(function (response) { // rest of the code }).error(function (err, status) { // rest of the code }); On the server side which is written in C#, I

When page is opened with window.open, how can the opened page allow the opener to access its contents?

大城市里の小女人 提交于 2021-01-27 19:32:53
问题 Is it possible for a page opened with window.open to allow itself to be examined by a cross-origin opener? (This is for use in internal applications, so security is not a significant concern.) And if so, how? I've tried replacing all of the CORS and Same-Origin policies I can find and I still get Access Denied on all properties for a child window. In particular I am trying to use Internet Explorer 11 Headers These are all of the headers I've tried so far Access-Control-Allow-Origin: http:/

How do I make a PHP CORS request?

邮差的信 提交于 2021-01-27 17:49:11
问题 I'm trying to use PHP Curl to make a request to our API site. At the moment, I'm trying to make a simple request The API site has a directory which returns JSON formatted data. The script is shown below:\ <?php header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS'); header('Access-Control-Max-Age: 1000'); header('Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With'); $arr['id'] = '001'; $arr['desc'] = 'Simple

CORS errors when trying to fetch from new Google Cloud API Gateway

倾然丶 夕夏残阳落幕 提交于 2021-01-27 17:01:52
问题 I was testing out the new API Gateway to secure a cloud function for my React application. So far the process has been much nicer than the previous alternatives, but I am currently getting CORS errors when trying to reach out to my API Gateway from my React app. I am setting the CORS headers correctly in my Cloud Function, but I have no known way of doing the same on the API Gateway endpoint. I am using Postman to test a request to the gateway endpoint and everything is working great, so it

CORS errors when trying to fetch from new Google Cloud API Gateway

这一生的挚爱 提交于 2021-01-27 16:57:20
问题 I was testing out the new API Gateway to secure a cloud function for my React application. So far the process has been much nicer than the previous alternatives, but I am currently getting CORS errors when trying to reach out to my API Gateway from my React app. I am setting the CORS headers correctly in my Cloud Function, but I have no known way of doing the same on the API Gateway endpoint. I am using Postman to test a request to the gateway endpoint and everything is working great, so it