[Python-Dev] Re: Allow custom headers in `http.server`

2019-10-26 Thread Alex Yursha
I thought about adding it as a command line option when invoked as `python3 -m http.server`. On Sat, Oct 26, 2019, 18:02 Guido van Rossum wrote: > Is this not something you can do yourself by calling send_header() after > calling send_response()? > > On Sat, Oct 26, 2019 at 7:33 AM

[Python-Dev] Allow custom headers in `http.server`

2019-10-26 Thread Alex Yursha
Hi CPython maintainers, I need to test my CORS setup and looking for a possibility to set a custom *Access-Control-Allow-Origin *header in http.server. As of now, there is no such feature. Are you interested in me writing a patch to contribute a feature of setting custom headers directly to `http.