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 <gu...@python.org> 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 Alex Yursha <alexyur...@gmail.com> wrote: > >> 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.server`? >> >> Best, >> - Alex >> _______________________________________________ >> Python-Dev mailing list -- python-dev@python.org >> To unsubscribe send an email to python-dev-le...@python.org >> https://mail.python.org/mailman3/lists/python-dev.python.org/ >> Message archived at >> https://mail.python.org/archives/list/python-dev@python.org/message/TB3HCDXFED3G6VGSKSYLHYJICEDJ7FCA/ >> Code of Conduct: http://python.org/psf/codeofconduct/ >> > > > -- > --Guido van Rossum (python.org/~guido) > *Pronouns: he/him **(why is my pronoun here?)* > <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/> >
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/SGUIPISTQXY526TIKWAKIKCQN3ECKTBP/ Code of Conduct: http://python.org/psf/codeofconduct/