---
title: "Enable CORS HTTP requests"
method: GET
path: "/cors_proxy_get"
tags: ["API Execution"]
---

# Enable CORS HTTP requests

`GET /cors_proxy_get`

This function allows your system to perform Cross-Origin Resource Sharing (CORS) HTTP requests.

## Query parameters

- `url` string, url, required

## Response `200`

HTTP Request was successful.

- object
  - `data` object
    - `_cp_redirects` object[], nullable — An array that contains the redirects which the website performs, if any exist. **Notes:** * This return counts redirects. * If any redirects exist, this returns as an array of objects containing the `content`, `protocol`, `reason`, `status`, `success`, and `url` returns and the `headers` object. * `null` - Redirects do not exist. **Note:** The JSON example output above displays this condition.
      - `headers` object, nullable — An object containing the header fields that the request returned. **Note:** This object's keys vary based on the URL's headers.
      - `protocol` string, nullable — The URL's HTTP protocol.
      - `reason` string, nullable — The response that the server returned.
      - `status` string, nullable — The response's HTTP status code.
      - `success` 0 | 1, nullable — Whether the function returned a 2XX HTTP status code. - `1` - Success. - `0` - Failure.
      - `url` string, url, nullable — The URL that provided the response.
    - `content` string — The URL's content. **Note:** We strongly recommend that you confirm the content's type before you use the content return's value. The function may also return this value in the _cp_redirects array of hashes. A valid string.
  - `metadata` object
    - `command` string — The method name called.
    - `reason` string — The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.
    - `result` 0 | 1 — * `1` - Success * `0` - Failed: Check the reason field for more details.
    - `version` integer — The version of the API function.

---

[API](https://skmtc.net/cpanel/apis/whm-api.md) · [All operations](https://skmtc.net/cpanel/apis/whm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/whm-api/revisions/3da41671c02c/schema)
