Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions source/utilities/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ const helpText = chalkTemplate`

--no-port-switching Do not open a port other than the one specified when it\'s taken.

--no-cache Sets \`Cache-Control\` to \`no-cache, no-store, must-revalidate\`

{bold ENDPOINTS}

Listen endpoints (specified by the {bold --listen} or {bold -l} options above) instruct {cyan serve}
Expand Down
2 changes: 2 additions & 0 deletions source/utilities/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export const startServer = async (

if (args['--cors'])
response.setHeader('Access-Control-Allow-Origin', '*');
if (args['--no-cache'])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a test please?

response.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate');
if (!args['--no-compression'])
await compress(request as ExpressRequest, response as ExpressResponse);

Expand Down