> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Error Messages in the Browser Console due to CORS Policy

> Fix CORS policy errors in the browser console caused by incorrect MoEngage SDK cluster configuration. Redirect API calls to the correct endpoint.

## Problem

In the browser console, error messages related to CORS policy were observed.

<img src="https://mintcdn.com/moengage/MBpE2Km0jgeTJl4Q/images/mceclip0.png?fit=max&auto=format&n=MBpE2Km0jgeTJl4Q&q=85&s=3e2dd6c002d85862e0a8f46bd7722930" alt="Mceclip0" width="954" height="454" data-path="images/mceclip0.png" />

## Cause

The API endpoint [https://websdk.moengage.com/v2/device/add](https://websdk.moengage.com/v2/device/add) belongs to the US cluster and the account to which the data was being redirected to exists in the EU cluster. As the Device Add calls were not being made to the correct API, CORS error is seen in the browser console.

## Solution

In the script where the MoEngage SDK is being initialized, ensure the data is being redirected to the EU cluster by passing **cluster: "eu"** key-value pair. Once this key-value is pair is added, clear the browser local storage and reload the page. The error messages would no longer be seen on the browser console.
