Skip to content
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

fix: use destination path for Content-Type header #121

Merged
merged 5 commits into from
Jul 2, 2024
Merged

fix: use destination path for Content-Type header #121

merged 5 commits into from
Jul 2, 2024

Conversation

tobz1000
Copy link
Contributor

@tobz1000 tobz1000 commented Jul 1, 2024

Uses the target path to determine content-type instead of the source path. The content-type sent from a dev server should match that sent from a preview-mode server.

This PR also updates the content-type value for script files to text/javascript, to match that used by mrmime: lukeed/mrmime#8

Small update/refactor to the test code.

Fixes #119.

- Update javascript content-type value
Copy link

changeset-bot bot commented Jul 1, 2024

🦋 Changeset detected

Latest commit: e81222e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tobz1000 tobz1000 changed the title Use dest content-type for transformed content fix: Use dest content-type for transformed content Jul 1, 2024
Copy link
Owner

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

test/tests.test.ts Show resolved Hide resolved
@tobz1000 tobz1000 changed the title fix: Use dest content-type for transformed content fix: Use destination path for content-type Jul 1, 2024
@sapphi-red sapphi-red added the bug Something isn't working label Jul 2, 2024
@sapphi-red sapphi-red changed the title fix: Use destination path for content-type fix: use destination path for content-type Jul 2, 2024
@sapphi-red sapphi-red changed the title fix: use destination path for content-type fix: use destination path for Content-Type header Jul 2, 2024
@sapphi-red sapphi-red merged commit d68aec9 into sapphi-red:main Jul 2, 2024
8 checks passed
@github-actions github-actions bot mentioned this pull request Jul 2, 2024
@tobz1000 tobz1000 deleted the fix/target-filename-content-type branch July 2, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set content-type header from target filename
2 participants