guide/content/en/plugins/sanic-ext/configuration.md
Sanic Extensions can be configured in all of the same ways that you can configure Sanic. That makes configuring Sanic Extensions very easy.
app = Sanic("MyApp")
app.config.OAS_URL_PREFIX = "/apidocs"
However, there are a few more configuration options that should be considered.
extend.. column::
Even though Sanic Extensions will automatically attach to your application, you can manually choose `extend`. When you do that, you can pass all of the configuration values as a keyword arguments (lowercase).
.. column::
```python
app = Sanic("MyApp")
app.extend(oas_url_prefix="/apidocs")
```
.. column::
Or, alternatively they could be passed all at once as a single `dict`.
.. column::
```python
app = Sanic("MyApp")
app.extend(config={"oas_url_prefix": "/apidocs"})
```
.. column::
Both of these solutions suffers from the fact that the names of the configuration settings are not discoverable by an IDE. Therefore, there is also a type annotated object that you can use. This should help the development experience.
.. column::
```python
from sanic_ext import Config
app = Sanic("MyApp")
app.extend(config=Config(oas_url_prefix="/apidocs"))
```
.. note::
Often, the easiest way to change these for an application (since they likely are not going to change dependent upon an environment), is to set them directly on the `app.config` object.
Simply use the capitalized version of the configuration key as shown here:
```python
app = Sanic("MyApp")
app.config.OAS_URL_PREFIX = "/apidocs"
```
corsboolTruecors_allow_headersstr"*"access-control-allow-headerscors_always_sendboolTrueaccess-control-allow-origincors_automatic_optionsboolTrueOPTIONS endpoints for routes that do not already have one definedcors_expose_headersstr""access-control-expose-headerscors_max_ageint5access-control-max-agecors_methodsstr""access-control-access-control-allow-methodscors_originsstr""access-control-allow-origin.. warning::
Be very careful if you place `*` here. Do not do this unless you know what you are doing as it can be a security issue.
cors_send_wildcardboolFalsecors_supports_credentialsboolFalseaccess-control-allow-credentialscors_vary_headerboolTruevary headerhttp_all_methodsboolTrueCONNECT and TRACE methods as allowablehttp_auto_headboolTrueHEAD handlers to any GET routeshttp_auto_optionsboolTrueOPTIONS handlers to any routes withouthttp_auto_traceboolFalseTRACE handlers to any routes withoutoasboolTrueoas_autodocboolTrueoas_ignore_headboolTrueTrue, it will not add HEAD endpoints into the OpenAPI specificationoas_ignore_optionsboolTrueTrue, it will not add OPTIONS endpoints into the OpenAPI specificationoas_path_to_redoc_htmlOptional[str]Noneoas_path_to_swagger_htmlOptional[str]Noneoas_ui_defaultOptional[str]"redoc"oas_url_prefix endpoint; when None there will be no documentation at that locationoas_ui_redocboolTrueoas_ui_swaggerboolTrueoas_ui_swagger_versionstr"4.1.0"oas_uri_to_configstr"/swagger-config"oas_uri_to_jsonstr"/openapi.json"oas_uri_to_redocstr"/redoc"oas_uri_to_swaggerstr"/swagger"oas_url_prefixstr"/docs"swagger_ui_configurationDict[str, Any]{"apisSorter": "alpha", "operationsSorter": "alpha", "docExpansion": "full"}templating_enable_asyncboolTrueenable_async on the Jinja Environmenttemplating_path_to_templatesUnion[str, os.PathLike, Sequence[Union[str, os.PathLike]]] templatestrace_excluded_headersSequence[str]("authorization", "cookie")TRACE requests