option to set custom response headers, example Service-Worker-Allowed
See original GitHub issueoption to set custom response headers, for instance Service-Worker-Allowed
. possible add more then one custom headers to response.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:8 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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"
orhttp-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?I just proposed #360 which would solve for this…and potentially all the other (un)imagined uses for HTTP headers. 😁 Thoughts welcome!