Questions tagged [cors]

Cross-Origin Resource Sharing (CORS) is a specification that enables open access across domain-boundaries

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

Ubuntu + Strapi: nginx CORS on proxy pass: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource

I have set up nginx to redirect http request to https for my strapi server. However, I always got CORS issue when using https (when I use http, it is going through). Currently, this is my nginx ...
Vy Vương's user avatar
0 votes
0 answers
31 views

Cors issue when deploying a mernstack app on minikube

I have a mern stack app (react vite + nodejs) web app that is working fine as i enabled cors middleware to allow my frontend to send requests to the backend but the problem is when i tried to deploy ...
Achref's user avatar
  • 1
0 votes
1 answer
53 views

MIXED CONTENT/CSP issue from (VPS) nginx reverse proxy with termination SSL and (HOME) nginx wordpress

It's been few day as I try to figure out what I'm doing wrong. DNS points to VPS on VPS I have nginx reverse proxy with ssl termination that forward request to home server on home server I have nginx ...
Va_ni_tas's user avatar
0 votes
0 answers
45 views

Cannot edit my 2 of my Custom Headers in IIS

I'm having a few problems that I hope you can help me with. I have 2 web servers 2016, with IIS 10. And I've created a number of CORS on these Web Servers (Configuration Editor, system.webserver/...
Kenzo_Gilead's user avatar
0 votes
0 answers
175 views

How to block API calls outside its own domain ( NGINX )

I have a website running with NGINX where I have an API and a Vue APP, let's say API it's on api.example.com and the Vue APP it's on www.example.com and I have some requests that I can't use a ...
Gonçalo Bastos's user avatar
0 votes
1 answer
189 views

S3 site in Cloudfront Preflight 302 Error

I have a static s3 website hosted through CloudFront. In it, I make a request that will result in a redirect if the user is not logged in. Preflight then fails because of a 302: Access to fetch at '...
Demian Licht's user avatar
0 votes
0 answers
158 views

AWS Elastic Beanstalk max request post size

I have an application consisting of the following: Vue.JS front-end website Dotnet Core API From the front-end, I wish to allow the user to upload up to 10 files totaling up to a maximum of 50 ...
Carel's user avatar
  • 131
0 votes
0 answers
220 views

NGINX adds header multiple times falsely

I want to add CORS to my reverse-proxy. Generally everything is working but I don't understand why even though reading the documentation on add_header and reading several forum entries. In my case I ...
sascha10000's user avatar
0 votes
0 answers
65 views

How does "add_header Access-Control-Allow-Origin * " work

Does it mean our nginx server can access any other server's resources? Or does it mean other any servers can access our nginx server's resources? I know it's related to Cross Origin Resource Sharing. ...
zeeshanseikh's user avatar
0 votes
1 answer
815 views

CORS access-control headers not visible in the response headers section of Chrome inspector

Using https://cors-test.codehappy.dev/ to test our test server's new CORS policy, we receive: These are the response headers received when making the request: access-control-allow-credentials: true ...
Steve's user avatar
  • 365
0 votes
0 answers
387 views

Title: CORS Preflight Issue with AWS API Gateway and Lambda Function

I have been experiencing a persistent issue with CORS preflight requests when trying to use AWS API Gateway and Lambda function for sending emails from my website's contact form. Despite following ...
ozim's user avatar
  • 1
1 vote
1 answer
660 views

Multiple cors sites on Traefik

I'm using Traefik on my Ubuntu server. Cors works fine for one website but when I try to use it for two they seem to conflict. What is the correct syntax? This is what I have in my docker-compose file:...
Joe Gatt's user avatar
  • 113
1 vote
0 answers
646 views

How do I fix CORS issues in Cloudfront CDN?

I run a WordPress website and recently configured a CDN using CloudFront. Most of the features are working fine, but I'm experiencing CORS issues with JS files I'm loading from Github. I have tried ...
cheonmu's user avatar
  • 35
0 votes
1 answer
664 views

Setting up SSL in Apache2 with backend docker app

I'm running Ubuntu server (18.04) on an Azure VM, with Apache2 (2.4.29). I have a backend app running in docker on the same host that is called by my site. This works easy enough without SSL. I added ...
TonyD's user avatar
  • 1
0 votes
1 answer
947 views

NGINX: Return CORS headers when request method is OPTIONS and file exists, otherwise pass to PHP-FPM

I have an NGINX with a PHP-FPM instance behind it. OPTIONS requests for paths for which a file exists in the file system should be handled by NGINX. For those requests, NGINX should return Access-...
Orlando's user avatar
  • 151
0 votes
0 answers
1k views

How to set Access-Control-Allow-Origin for multiple origin domains with Tomcat?

An answer on SO to the same nice - and following guidelines - question but for Apache, how to set Access-Control-Allow-Origin entry header for multiple origin domains deals with .htaccess, checking ...
Amessihel's user avatar
  • 113
0 votes
0 answers
119 views

Why would you want a dot at the start of a fqdn in a CORS Access-Control-Allow-Origin header?

I've recently seen a URL listed in a CORS Access-Control-Allow-Origin header where the fqdn portion starts with a dot (eg. 'http://.example.com'). I'm struggling to think of a good reason for this, ...
spoovy's user avatar
  • 354
1 vote
0 answers
162 views

Digital Ocean Space Cors with private files

I am unsure whether I am misunderstanding CORS or whether this is possible within a Digital Ocean Space. Basically, I want to set a file to private on the DO Space. I only want a certain domain to be ...
Soup Dragon's user avatar
1 vote
0 answers
2k views

Disable CORS using kubernetes ingress

Is it possible to forcefully disable CORS using kubernetes nginx ingress when the application is allowing CORS? I have an application that I believe is sending Access-Control-Allow-Credentials:true ...
Dushyant Bangal's user avatar
3 votes
2 answers
1k views

CORS error - Website is not reachable (ERR_FAILED), then redirects and works by itself

Error: I get "This site can't be reached ..." and then it automatically redirects and then the page works. Please see the screengrab GIF below. This error happens in random unpredictable ...
Joseph's user avatar
  • 131
0 votes
1 answer
2k views

Getting CORS error while accessing audio files on same server in chrome

Access to video at '/path/to/mp3/file' from origin 'https://example.com' has been blocked by CORS policy: Request had a target IP address space of unknown yet the resource is in address space public.
Shikhu Gupta's user avatar
0 votes
0 answers
756 views

content type is returned as text/html while the expected is application/json

some endpoints are returning the content type as text/html while the expected is application/json causing CORS error in the client side. when requesting from my localhost or from the server's IP ...
Diaa Saber's user avatar
10 votes
2 answers
5k views

OPTIONS request to CloudFront distribution with managed CORS-With-Preflight policy returns 403

I have a CloudFront distribution with a default behavior that is configured to allow any CORS request including preflight requests. However, the OPTIONS request will fail with an HTTP 403 error (...
aaronk6's user avatar
  • 456
2 votes
0 answers
1k views

CloudFront CORS request using signed cookies and withCredentials, not sending back Access-Control-Allow-Credentials unless I include some extra header

I'm having a very strange issue that I can't seem to crack. I configured a private CloudFront distribution to serve content from a private S3 bucket. I am using signed cookies to grant access to the ...
bryan60's user avatar
  • 71
0 votes
2 answers
13k views

add CORS policy on NGINX server

i'm having difficulties adding CORS policy to my NGINX server. I have pointed DNS server to server but the problem in CORS policy is not working. When accessing subdomain.domain.com everything works ...
sintezators's user avatar
2 votes
0 answers
735 views

CORS is not working NGINX + DJANGO + REACT application

Existing nginx configuration given bellow. I tried in multiple way but nothing is working. server { server_name backend.xxxxxx.com www.backend.xxxxxx.com; client_max_body_size 100M; #...
Ariful Islam's user avatar
1 vote
0 answers
381 views

Angular application CORS issues using Nginx

My Angular application is unable to make requests to my backend. This is the Nginx configuration server { listen 0.0.0.0:443 ssl; listen [::]:443 ssl; server_name my.site.io; ssl_certificate ...
Antonio Santoro's user avatar
0 votes
2 answers
6k views

"CORS Multiple Origin Not Allowed" - using parse-server and apache2

I am using apache2 as a reverse proxy for my parse-server. In order to allow Cross Origin Requests I originally tried setting: Header always set Access-Control-Allow-Origin "*" in the ...
serverNewbie's user avatar
1 vote
0 answers
3k views

Nginx Reverse Proxy 403 Errors on POST Requests

I'm trying to set up a stack of services in Docker: Unifi, PHP, Nginx, and Certbot, where Unifi and PHP are the backend services and Nginx serves them in reverse proxy mode, while Certbot runs ...
Adam Harbach's user avatar
5 votes
1 answer
2k views

Is it impossible to have conditional headers in Nginx?

I am currently trying to only return a set of CORS headers conditionally using Nginx. At first it seemed like a simple task, as I already had this working config: upstream api-app { server unix:/tmp/...
Stefan Horning's user avatar
0 votes
1 answer
2k views

Nginx patch request ends up with Invalid CORS request

It's simple set up. Three docker containers in same network. ReactJs - production build on nginx server Spring Boot Mysql GET, POST request works like a charm but when i try to use PATCH request i ...
Lucas's user avatar
  • 1
0 votes
0 answers
1k views

how to allow POST to php file in apache only from same-origin?

I have a website with a HTML form that, when submitted, successfully sends a POST request to a .php file on the server (Apache 2.4.48). However, when I let Javascript handle the submitting through a ...
Tai's user avatar
  • 1
0 votes
1 answer
648 views

CORS prevent js window.onerror from subdomain reporting informations

To log Javascript errors i have set up a function with window.onerror which trigger an ajax request and inform me about script errors. I load all my static files from a subdomain and if an error ...
delato468's user avatar
  • 103
1 vote
1 answer
2k views

AWS Cloudfront CORS trouble with font files

I have a Javascript application that is delivered to the browser from a CloudFront endpoint. All static files of the application are hosted in an S3 bucket. That involves a whole bunch of javascript ...
UncleBob's user avatar
  • 247
1 vote
0 answers
469 views

NGINX Cors allow origin not match origin

I have a big problem in my website. Since i moved from Apache webserver to Nginx the ads in my site are not working. I added these lines in my website config file in nginx: add_header 'Access-Control-...
Svg Lev's user avatar
  • 11
1 vote
1 answer
515 views

Enable CORS in a specific folder with dot in directory name

I am trying to enable CORS in a specific file (stellar.toml) located at mydomain.com/.well-known/stellar.toml I added the below catch all and allow for testing in my .htaccess file on my litespeed/...
Saj's user avatar
  • 613
0 votes
1 answer
833 views

FoundryVTT server behind an IIS reverse proxy CORS issues

I have a FoundryVTT server in a FreeNAS jail. I mostly followed these instructions to get it to work. I had a previous problem, which I solved and it works fine now for <= v0.7.9. However, >= v0....
Neijwiert's user avatar
  • 103
1 vote
0 answers
304 views

Why doesn't CORS apply? in gcp app-engine

I am trying to post marvin JS on the site. There is no problem with the iframe and the function itself, but a problem occurs when using additional functions. When the current page is executed, the ...
조형식's user avatar
1 vote
0 answers
1k views

CORS and Preflight problems while making api calls

I have some CORS and preflight problems with my software I can't solve. To test it I was ursing a cors test site to simulate it. When I make an api request to my server application I get the following ...
TmCrafz's user avatar
  • 139
0 votes
0 answers
940 views

How to apply access control header to folders AND subfolders in Nginx

In my /etc/nginx/sites-available/default file I currently have blocks along the lines of location /cdn { add_header Access-Control-Allow-Origin *; } which has worked well - up until now. ...
DroidOS's user avatar
  • 173
1 vote
1 answer
2k views

CORS conflict after enabling FPM in PHP

In the .htaccess file on my web server, I have the following CORS header set: Header set Access-Control-Allow-Origin "example.com" In one of my PHP scripts, that I frequently call while ...
XtevensChannel's user avatar
0 votes
3 answers
1k views

CORS won't allow PATCH requests on apache 2.41

I've been trying to use PATCH for an API I'm building. All requests fail because of CORS. I've tried editing my website's .htaccess file to include the following: Header always set Access-Control-...
Meaxis's user avatar
  • 1
1 vote
1 answer
2k views

Nginx - Cross-Origin Request Blocked

We are getting this error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://stats.g.doubleclick.net In our nginx configuration we have: add_header ...
JoaMika's user avatar
  • 509
0 votes
0 answers
2k views

Docker + nginx to bypass CORS

I'd like to use nginx locally to bypass CORS in browser. I'm having trouble with getting the request back out of nginx. How would I get it to call an address back in my own pc's environment/context ...
Valu3's user avatar
  • 101
2 votes
1 answer
9k views

Angular CORS with Nginx

Several questions for the same topic on the net but nothing worked. I have a serverXYZ running an Angular app, a backend tomcat webapp for authentication, a nginx server. Angular app on port 4200, ...
glass's user avatar
  • 25
0 votes
3 answers
2k views

CORS Error in Google App Engine on java server

I have two apps. Frontend(Angular) running on Firebase Backend Spring Boot (Java11) running on App Engine Got this error while trying to reach any endpoints in app engine "Access has been blocked ...
RtiOne Kkarkov's user avatar
1 vote
3 answers
2k views

NGINX frontend HTTPS server rejects requests to local backend http express server

I have an application that's split into two servers: one is a React application running on port 8080 and the other is an Express server running on 3001. The machine running this application has to run ...
Charlie Monnone's user avatar
0 votes
0 answers
997 views

Specify header set depending on the HTTP referer

I am working on two separete ReactJS project which are both making use of the PHP API. Both react project are running from the dev server on port 3000 and one on 3001. Because the ReactJS on these ...
Boardy's user avatar
  • 268
2 votes
2 answers
9k views

CORS blocked by No "Access-Control-Allow-Origin" on dockerized Angular frontend app and Spring Boot dockerized backend

I have built an Angular app and created a docker image, which makes it run on an Nginx server (once it is run). For the backend, I have a dockerized implementation as well. While trying to access the ...
Leo's user avatar
  • 21
2 votes
1 answer
11k views

How to add Access-Control-Allow-Origin header in NGINX for one specific domain

I have problem with my nginx configuration. I want to add Access-Control-Allow-Origin header in nginx config, for one domain but for both http and https I tried this configuration, but it doesn't work:...
Xavier123's user avatar