Skip to content

Commit

Permalink
chore: add comments to headers, fix typo in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberalien committed Nov 4, 2022
1 parent 3f69d31 commit ee16dbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ By default, server sends the following HTTP headers:
- Various CORS headers, allowing access from anywhere.
- Cache headers to cache responses for 604800 seconds (7 days).

To change headers, edit `header` property in `src/config/app.ts`, then rebuild script.
To change headers, edit `headers` property in `src/config/app.ts`, then rebuild script.

## Node vs PHP

Expand Down
2 changes: 2 additions & 0 deletions src/config/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ export const appConfig: AppConfig = {

// HTTP headers to send
headers: [
// CORS
'Access-Control-Allow-Origin: *',
'Access-Control-Allow-Methods: GET, OPTIONS',
'Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Accept-Encoding',
'Access-Control-Max-Age: 86400',
'Cross-Origin-Resource-Policy: cross-origin',
// Cache
'Cache-Control: public, max-age=604800, min-refresh=604800, immutable',
],

Expand Down

0 comments on commit ee16dbd

Please sign in to comment.