question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

option to set custom response headers, example Service-Worker-Allowed

See original GitHub issue

option to set custom response headers, for instance Service-Worker-Allowed. possible add more then one custom headers to response.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:8
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Mirodilcommented, Dec 12, 2016

yes, you are right, it is “a simple zero-configuration command-line http server” tool but it will be optional flag which turn on some custom headers. we can use -H/--header <header> which add custom header. example of use: http-server ./folder -H "Custom-Header1:value1" -H "Custom-Header2:value2" or http-server ./folder -H "Custom-Header1:value1" "Custom-Header2:value2" in this case we don’t need to add custom flag each time to add custom headers. What do you think?

1reaction
BigBlueHatcommented, Apr 25, 2017

I just proposed #360 which would solve for this…and potentially all the other (un)imagined uses for HTTP headers. 😁 Thoughts welcome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

option to set response headers, specially for CORS #43 - GitHub
I'm developing locally and need multiple servers running on different ports, so XHR doesn't work (different port is also blocked by ...
Read more >
HTTP headers - MDN Web Docs - Mozilla
HTTP Client hints are a set of request headers that provide useful information about the client such as device type and network conditions, ......
Read more >
How exactly add "Service-Worker-Allowed" to register service ...
So finally I understood that the header to add is a response header, ... the file which needs "Service-Worker-Allowed:/" is the app.js file....
Read more >
How to Set a Header on a Response with Spring 5 - Baeldung
In this quick tutorial, we'll explore the different ways of setting a header on a service response, either for non-reactive endpoints or ...
Read more >
How to return Service Worker with custom HTTP header from ...
And then define a route for it, where the path is not existing as a static file, like: example.serviceworker: path: '/serviceworker' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found