> This page is for Server SDKs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# get_cors_config

> Get CORS configuration suitable for FastAPI's CORSMiddleware.

Get CORS configuration suitable for FastAPI's `CORSMiddleware`.

## **Returns**

`dict[str, Any]` -- Dictionary with `allow_origins`, `allow_credentials`,
`allow_methods`, and `allow_headers` keys.

## **Example**

```python {6}
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from signalwire.core.security_config import SecurityConfig

security = SecurityConfig()
cors_config = security.get_cors_config()

app = FastAPI()
app.add_middleware(CORSMiddleware, **cors_config)
print(cors_config)
# {'allow_origins': ['*'], 'allow_credentials': True, 'allow_methods': ['*'], 'allow_headers': ['*']}
```