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

How to let the json file (*.json) return response header: 'application/json', instead of 'application/json; charset=UTF-8' #859

Open
helloint opened this issue May 20, 2023 · 1 comment
Labels

Comments

@helloint
Copy link

Environment Versions

  1. OS Type macOS
  2. Node version: $ node --version v12.22.12
  3. http-server version: $ http-server --version v14.1.1

Steps to reproduce

I have a json text file and start http-server

http-server ./public -c-1 -p 3000 --cors

What I got is: application/json; charset=UTF-8

How can I just let it return application/json?
I'm using latest http-server version, but I checked the source code, looks like this issue has been there from the very beginning.

Expected result

application/json

Actual result

application/json; charset=UTF-8

image

Thanks.

Copy link

This issue has been inactive for 180 days

@github-actions github-actions bot added the stale label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant