Skip to content

Allow mismatched extensions when globbing rewrites. #198

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

Merged
merged 1 commit into from
Dec 29, 2015

Conversation

mbleigh
Copy link
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