Skip to content

Add lookupMap option#71

Merged
kanongil merged 3 commits intohapijs:masterfrom
kanongil:lookupmap-option
Dec 27, 2016
Merged

Add lookupMap option#71
kanongil merged 3 commits intohapijs:masterfrom
kanongil:lookupmap-option

Conversation

@kanongil
Copy link
Copy Markdown
Contributor

This adds a new directory and file option named lookupMap which allows the supported content-encodings and file extension for lookupCompressed to be customized.

The primary reason for this, is to enable non-gzip lookups once hapi@15 lands with custom encoding support. Eg. it would be possible to lookup brotli pre-compressed files with this config:

{
    lookupCompressed: true,
    lookupMap: { gzip: '.gz', br: '.br' }
}

Note that the compressed file will not be served, unless the server already understands how to compress the br encoding, via https://github.com/kanongil/brok or similar.

@kanongil kanongil added the feature New functionality or improvement label Aug 23, 2016
@kanongil kanongil merged commit a164a8f into hapijs:master Dec 27, 2016
@kanongil kanongil self-assigned this Dec 27, 2016
@kanongil kanongil added this to the 4.1.0 milestone Dec 27, 2016
@lock
Copy link
Copy Markdown

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature New functionality or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant