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
0answers
101 views

Running Redoc test server locally

I am trying to run up a small redoc server locally. I have created the swagger.json file. And it works fine when I place it in a hosted webserver and point to it in the index.html file as: <redoc ...
0
votes
0answers
25 views

Cloudfront accepts only first Origin encountered even if S3 bucket CORS rules allow several

I have a web site that is available from different top domains for different countries (www.example.se and www.example.dk) that share all the kinds of static assets that are best served from CDN. My ...
1
vote
0answers
30 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 ...
0
votes
0answers
47 views

Laravel run from php artisan server not working CORS only for storage

Laravel run from (http://IP_ADDRESS:80) php artisan serve --port=80 Not working CORS only for storage image with fetch GET (axion) ?! And i access from http://IP_ADDRESS:3000/ Every route works even ...
0
votes
0answers
27 views

Uploading file from JS web app to S3 fails due to CORS

I have a JS web app and I'm trying to upload a file to AWS S3 from the client. I've tried everything both locally (localhost:3000) and when deployed to production (Vercel serverless functions). I ...
1
vote
0answers
44 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 ...
0
votes
0answers
44 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. ...
1
vote
1answer
193 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 ...
0
votes
0answers
34 views

Trying to configure my NGINX file to add CORS policy, looking for some verification if I set up my config correctly

I've proxied my API that I use to pull data using nginx. I've configured it, it works just fine when I insert a URL request through a web-browser, HOWEVER, I get an issue when I request GET this data ...
0
votes
3answers
132 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-...
1
vote
1answer
336 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 ...
0
votes
0answers
18 views

No connection to a backend trough reverse proxy

The following error occurs while attempting to request a backend through reverse proxy: POST http://<IP>:3000/api/rpc-run net::ERR_CONNECTION_TIMED_OUT The web-client makes cross-origin-site ...
0
votes
0answers
155 views

Grafana local CORS bypass using nginx

I'm trying to work with a grafana server in an environment I can't change. I need CORS to be enabled to develop locally. I'm trying to start a local docker nginx server to solve it when developing ...
0
votes
0answers
560 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 ...
0
votes
1answer
2k 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, ...
0
votes
3answers
474 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 ...
0
votes
1answer
75 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 ...
0
votes
0answers
30 views

Use Cloudflare Worker to avoid preflight requests

I have a statically hosted SPA at app.example.com, communicating with a Rest API at api.example.com. I use Cloudflare as reverse proxy in front of both. I would like to avoid preflight requests to be ...
0
votes
0answers
122 views

Nginx + Redis - Unable to fix CORS error on HTTPS - only works for http

I have a website running on a Nginx + Php-FM + Redis Stack . Was getting some CORS warnings with error Access to font at '...fa-brands-400.woff2' from origin 'https://example.com' has been blocked by ...
0
votes
0answers
119 views

Nginx Subdomains blocked by CORS policy

I have 3 sub-domains (sub1.domain.com, sub2.domain.com, sub3.domain.com). sub1.domain.com calls sub2.domain.com for information and I keep getting the following: Access to XMLHttpRequest at 'https://...
0
votes
0answers
73 views

Is it possible disable redirect(301) for preflight request to 200?

I have some api http://myapi.com. I added tls 1.3, moved to https://myapi.com And now my angular client cannot send requests to api http://myapi.com. Errors appears: Response to preflight request ...
0
votes
0answers
98 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 ...
0
votes
0answers
35 views

Access-Control-Allow-Credentials rejection from the server on GKE service

I have a Virtuoso SPARQL Endpoint service authenticating with OpenID Connect running on GKE cloud service. I do not use ingress to expose a service outside but use the Layer 4 load balancer. From a ...
2
votes
2answers
3k 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 ...
0
votes
1answer
501 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:...
1
vote
0answers
9 views

cors header wasn't set in request although apache server was configured

can anyone point me why my request header wasn't set with cors header although in apache httpd.conf was configured just to do that. Am I missing something here ?? Thanks in advance. <Directory &...
0
votes
0answers
36 views

sharing assets between domain and subdomain without sharing with public

I want to put my images in img.mysite.tld hosted in gitlab And use them in my static site mysite.tld & www. mysite.tld, hosted in netlify. But ensure that no other domain can use them like using ...
0
votes
0answers
249 views

Nginx cors configuration for 2 sub-domains with separate ssl

I have two apps running on my server. A react app on port 4512 (locally on HTTP) and 5512 (on https). Can be accessed on https://merchant.abc.com:5512 A node js (express) API on port 4511 (locally on ...
0
votes
0answers
40 views

On what server is the 'frame-ancestors' Content Security Policy managed?

I'm just trying to get clarification on the proper use of this. Assuming I have a website on server 'A' that intends to serve an i-frame of a page hosted by server 'B', but the request is being ...
1
vote
0answers
200 views

Nginx Cross-Origin Request Blocked

I have this error in my web page: "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.cdn-example.com. (Reason: CORS header ‘Access-Control-Allow-...
0
votes
1answer
190 views

Installing CORS on Ubuntu 18.0.4 LTS

I want to install/use CORS on my Ubuntu server 18.0.4 LTS for the Wordpress websites that I am hosting. Normally I just add the line in the .htaccess but that doesn't seem to work anymore. Any ...
1
vote
0answers
354 views

CORS error despite CORS being enabled in app server and Nginx

I have a web application and server which is fully functional in a debugging environment, however when it's hosted for production, I get the following error in the browser console: Cross-Origin ...
0
votes
1answer
38 views

Access-Control-Allow-Origin header is not include in response when using a POST request

I have the following in my nginx config: location / { # CORS add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST' always; proxy_pass ...
1
vote
0answers
23 views

Nginx doesn't forward the OPTIONS request to application [duplicate]

I have an Nginx server and a PHP application running in PHP-FPM. The application is restful API. The problem is I get OPTIONS request which the application understands and supports, but the server ...
2
votes
0answers
1k views

firefox throws CORS error but works fine in chrome

I have set the following in apache RequestHeader edit "If-None-Match" '^"((.*)-(gzip|br))"$' '"$1", "$2"' SetEnvIf Origin "^http(s)?:\/\/(.+\.)?(iac-dev-...
1
vote
0answers
49 views

nginx not setting Vary header successfully

I have gzip_vary on; I also have (inside a server section): add_header Vary Origin; Yet when I inspect headers sent, the Vary header only includes Accept-Encoding; if I remove the gzip_vary on; ...
0
votes
0answers
59 views

How to define CORS settings on root level (base level) in Nginx configuration file

I have this working Nginx configuration: location /static/ { # Uncomment the following line in production mode expires max; # Remove signature of the static files that is used to ...
1
vote
0answers
261 views

Should I avoid CORS when building an SPA with backend API hosted on the same server?

I've stumbled upon this question and had the thought that my application should not require CORS, since it is hosted on the same server (a raspberry pi). However, since CORS is a security "feature" I'...
1
vote
1answer
894 views

Digital Ocean Spaces S3: Is it possible to add access-control-allow-origin: * to all requests?

If you curl my image curl -i https://local-spaces.fra1.digitaloceanspaces.com/test.jpg you will see that there is no Access-Control-Allow-Origin header in the response. If you curl like this, the ...
0
votes
1answer
2k views

Allow requests only for specific referer within domain

please consider following scenario: I have an API running on the same server as IIS. IIS is hosting a webpage. I want to allow access to the API to this webpage only. No other page from within the ...
2
votes
1answer
6k views

How to enable CORS in Nginx

I have tried every tutorial on the internet and on serverfault regarding this. No matter what I do, CORS is not working in nginx Here is my example.conf server { root /var/www/html; ...
1
vote
1answer
611 views

CloudFront drops Access-Control-Expose-Headers header when Accept-Encoding is set

I am trying to get CloudFront to serve a gzipped text file along with Content-Length: <bytes> and Access-Control-Expose-Headers: Content-Length headers so I can display the download progress ...
0
votes
1answer
2k views

CORS policy: No 'Access-Control-Allow-Origin' for JSON files

I kept a JSON files in Server A, ip : 111.111.111.111/folder1/a.json From Server B [ ip : 444.444.444.444 ], I am trying to access that JSON file , I received the result below: Access to ...
0
votes
1answer
2k views

VueJS sending POST to Flask fails (CORS Request blocked)

I've been following this vuejs guide and this flask guide to host my frontend and backend on a raspberry pi. On my frontend I have this method, which sends an axios POST to the backend. // path = ...
0
votes
1answer
244 views

Exchange REST API CORS Issue

I've created an add-in for Outlook which uses the Exchange REST API to load email headers and forward emails. In my O365 environment it works without any problem. Now I try to deploy the add-in at one ...
1
vote
0answers
22 views

Path specific load-balancing over multiple AWS Beanstalk applications

I currently have two AWS beanstalk applications: One for my web app server (web_beanstalk_env) and one for my api (api_beanstalk_env). They are currently routed through Route 53 as api.example.com =&...
-2
votes
1answer
699 views

cors post laravel vuejs (405 Method Not Allowed)

People let me ask the same post method as to why the place is not. I'm calling api post between laravel and vuejs. thanks all read the article!
1
vote
0answers
506 views

CORS set to allow all but preflight still fails

I am using Istio in Google Kubernetes Engine with Istio. I've added a CORS policy to my virtual service that allows all origins. It looks like this: - match: - port: 443 route: - ...
0
votes
0answers
808 views

How get works symfony 4, cors, localhost, nginx

i have such nginx config: server { listen 127.0.0.1:80; server_name wtf; root /home/egor/PhpstormProjects/wtf/public/; client_max_body_size 32m; location / { if ($...
1
vote
1answer
799 views

Enable CORS for GKE Kubernetes API

I have a Kubernetes Engine cluster set up in Google Cloud Platform and it's working wonderfully. I can query the Kubernetes API itself to get info on Kubernetes objects, using the IP-based URL of the ...