aimeos jsonapi request blocked by CORS policy - aimeos

On local development I am facing following error on ajax request:
Access to XMLHttpRequest at 'http://pmb.local/jsonapi/product' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Need to the following change this this file
Ddont forget to run:
php artisan optimize

Related

Access to XMLHttpRequest at 'https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch' from origin 'https://devicemanagement.portal.azure.com

I'm getting this error trying to add Microsoft 'New Store' app function in Intune. I tried getting help from Microsoft, but they were no help.
Using Edge and Chrome , both give the same result. My pc has been rebuilt, I reset Edge & Chrome's browser settings, history and everything I can think off. Still have the same issue.
`Access to XMLHttpRequest at 'https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch' from origin 'https://devicemanagement.portal.azure.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
/#view/Microsoft_Intune_Apps/AppWizardBlade/appId/00000000-0000-0000-0000-000000000000/appType/WinGetStoreApp:1
Access to XMLHttpRequest at '``https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch``' from origin '``https://devicemanagement.portal.azure.com``' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Access to XMLHttpRequest at '``https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch``' from origin '``https://devicemanagement.portal.azure.com``' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
/#view/Microsoft_Intune_Apps/AppWizardBlade/appId/00000000-0000-0000-0000-000000000000/appType/WinGetStoreApp:1
Access to XMLHttpRequest at '``https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch``' from origin '``https://devicemanagement.portal.azure.com``` ' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. ``
Re-installed PC, Reset Edge and Chrome
Tried on another PC , same result.

Cors Option not constant

I'm having problem with CORS.
My Node.js Server with apollo-server-express(version 3.7)
My problem is CORS is not constant.
My React Project request api server and works well.
But sometimes api server response this error
Access to fetch at 'https://api.example.com/' from origin 'https://example.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Why same client request sometime response cors error?
Please Help.

CORS Issue on iframe to current Laravel route

I am pulling in an Iframe that has javascript included in it. I have installed the fruitcake cors package and set the config file to be wide open. I also added the "Access-Control-Allow-Origin' header to the xmlhttp request just in case because I am confused on who is actually denying the request. Here is the error I am getting -
Access to XMLHttpRequest at "https://site-that-i-am-posting-to" from origin "https://where-the-iframe-is-sourced-from" has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present of the requested resource.
Figured it out. I needed to add the correct request headers to the xmlhttprequest like this -
xhrapi.setRequestHeader('Origin', 'https://site-posting-from.com');
xhrapi.setRequestHeader('Access-Control-Request-Method', 'POST');
And then it worked. Thanks to anyone that tried to help!

Laravel Inertia, CORS with google login

am using ziggy with laravel and inertia, now using google login, i get the following error:
has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
here is my laravel routes:
Route::get('auth/{provider}', 'Auth\LoginController#redirectToProvider')
->name('login.provider');
Route::get('auth/{provider}/callback', 'Auth\LoginController#handleProviderCallback')
->name('login.callback');
how would i solve it please?
The response from the google service is missing the header Access-Control-Allow-Origin: * so the browser is blocking it.
Try to research a way to have that header included in the response.

No 'Access-Control-Allow-Origin' error in my Restify server

I am using Restify in my Heroku server. I am getting this error:
XMLHttpRequest cannot load https://xxx.xxx.com/charging. Response to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://xxx.xxx.com' is therefore not allowed access.
The response had HTTP status code 405.
My Restify configuration is:
server
.use(restify.fullResponse())
.use(restify.bodyParser())
.use(restify.queryParser())
.use(restify.CORS({
origins: ['https://xxx.xxx.com', 'http://xxx.xxx.com']
}));
What is missing in my configuration?
In some cases, you may need to use server.pre instead of server.use.
https://github.com/restify/node-restify/issues/573

Resources