Skip to content

Allow mismatched extensions when globbing rewrites.#198

Merged
jwngr merged 1 commit intomasterfrom
mb-rewrite-extensions
Dec 29, 2015
Merged

Allow mismatched extensions when globbing rewrites.#198
jwngr merged 1 commit intomasterfrom
mb-rewrite-extensions

Conversation

@mbleigh
Copy link
Copy Markdown
Contributor

@mbleigh mbleigh commented Dec 29, 2015

Previously, Superstatic disallowed a mismatch of URL to rewritten static asset. This prevents a valid use case of a URL that is an HTML representation of a non-HTML file, e.g. GitHub file browsing.

This PR removes the extension check and always serves the matched file. In addition, added a test to ensure that the mime type is taken from the static asset, not the file extension.

jwngr pushed a commit that referenced this pull request Dec 29, 2015
Allow mismatched extensions when globbing rewrites.
@jwngr jwngr merged commit b73a8e3 into master Dec 29, 2015
@jwngr jwngr deleted the mb-rewrite-extensions branch December 29, 2015 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants