Skip to content

Commit

Permalink
docs(README): Update default settings
Browse files Browse the repository at this point in the history
  • Loading branch information
elpete committed Sep 17, 2019
1 parent e80a808 commit a10c90a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ The following is the default configuration.
```
settings = {
autoRegisterInterceptor = true,
allowOrigins = "*",
allowMethods = [ "DELETE", "GET", "PATCH", "POST", "PUT", "OPTIONS" ],
allowHeaders = [ "Content-Type", "X-Auth-Token", "Origin", "Authorization" ],
allowOrigins = function( event ) {
return event.getHTTPHeader( "Origin", "*" );
},
allowMethods = function( event ) {
return event.getHTTPMethod();
},
allowHeaders = function( event ) {
return event.getHTTPHeader( "Access-Control-Request-Headers", "" );
},
maxAge = 60 * 60 * 24, // 1 day
allowCredentials = true,
eventPattern = [ "^Main\.ajax$", "api" ]
eventPattern = ".*"
};
```

Expand Down

0 comments on commit a10c90a

Please sign in to comment.