No 'Access-Control-Allow-Origin' header is present on the requested resource

Hi there

I have an InvoiceNinja Self-Hosted v5.5.14.

I have two different URLs for InvoiceNinja, erp.example.com for Admin access and cp.example.com for the client portal. After setting the APP_URL to https://cp.example.com in .ENV file, I am getting the following error:

Access to fetch at ‘https://cp.example.com/canvaskit/canvaskit.wasm’ from origin ‘https://erp.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.

If I go to https://cp.example.com, it is loading the client portal without any issues.

Is it possible to have a separate URL for the admin and client portal?

Thank you

Hi,

@david any thoughts? If possible it may help to only set the path in the canvaskit setting rather than the full URL.

Thank you, @david and @hillel

The Issue has been resolved after setting the path for canvasKitBaseUrl instead URL.

1 Like