Skip to content

Commit afc9a88

Browse files
authored
add array-like atlernative syntax
1 parent 5e60d2f commit afc9a88

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

security/handling-cors/index.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ CORS middleware is executed for all application routes.
7676
```
7777
globalMiddlewares.add(container.get('cors') as IMiddleware);
7878
```
79-
79+
or with array-like syntax
80+
```
81+
globalMiddlewares.add(container['cors'] as IMiddleware);
82+
```
8083
## Configure CORS settings
8184

8285
`TBaseCorsMiddlewareFactory` class provides several methods to help configure CORS

0 commit comments

Comments
 (0)