Skip to content

[Bug]: Access blocked by CORS / missing headers #923

@klickparkdominik

Description

@klickparkdominik

Expected behavior

When accessing Pimcore objects via datahub (graphql) I expect to get a valid response without CORS error.

Actual behavior

I get the following error:

Access to fetch at 'https://domainA.com/pimcore-graphql-webservices/myid?apikey=1337' from origin 'https://domainB.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.

Steps to reproduce

I access Pimcore objects via datahub (graphql) from my VueJS application.

Pimcore is running on: domainA.com
Frontend is running on: domainB.com

This issue started happening after the update to version 1.8.3.
Right now we are on version 1.9.0.

This issue is happening when Pimcore is set to environment dev and production no matter what.

Rebuilding workspaces and clearing cache does not resolve the problem.

I should maybe note that we use a self-hosted pimcore.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions