-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Major: 1.0 #64
Major: 1.0 #64
Conversation
- still optimized - adds ETag support to "dev" mode - adds brotli/gzip support to "dev" mode - Related: #3
- Closes #42
* fix(sirv-cli): use `host` for port availability * Add support for ETag-based caching When providing an ETag header on responses, the client automatically sends that header value on subsequent requests for the matching resource as an `If-None-Match` request header. If the ETag value received in `If-None-Match` is the same as the ETag computed by the disk crawl, a 304 "Not Modified" status can be returned along with an empty body to indicate that the requestor's cached value should be used. * chore: use existing `isEtag` var Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>
# Conflicts: # lerna.json # package.json # packages/sirv-cli/boot.js # packages/sirv-cli/package.json # packages/sirv/index.js # packages/sirv/package.json
- Node 8.x is already End of Life (2019-12-31)
- Closes #61
* Add option to specify asset paths for SPAs Allows asset path prefixes to be specified by the CLI when running in single-page mode. If a path is requested that doesn't exist, and that path matches one of the asset path prefixes, the request will 404 instead of retuning a 200 containing the root index. Fixes #44 * fix: ensure `assets` array & preload prep work * chore: add `assets` tests * chore: update options definition * update `--single` & `--assets` text Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>
So, I'm thinking about reverting (or reworking) the most recent Right now (in stable and next versions), when In this WIP-1.0, when I'm thinking that the ends-with-extension check is good enough for 99% of use cases... If you're ignoring other things, it's probably not asset related, and so I don't think the flag should be labeled as such. Instead, how about Interested in feedback. This is the remaining hurdle for 1.0 |
- ran before extensions could be applied - effectively reverts to #53
- include dummy apps directly
} | ||
let extensions = opts.extensions || ['html', 'htm']; | ||
let gzips = opts.gzip && extensions.map(x => `${x}.gz`).concat('gz'); | ||
let brots = opts.brotli && extensions.map(x => `${x}.br`).concat('br'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback please decodeURIComponent because this issue is back: #21
if (brots && /(br|brotli)/i.test(val)) extns.unshift(...brots); | ||
extns.push(...extensions); // [...br, ...gz, orig, ...exts] | ||
|
||
let pathname = req.path || parser(req, true).pathname; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rollback please decodeURIComponent because this issue is back: #21
TODO
sirv-cli
+sirv
merger?