[Python] Enable access control on simple HTTP server

Discussão em 'Python' iniciado por Stack, Janeiro 18, 2025.

  1. Stack

    Stack Membro Participativo

    I have the following shell script for a very simple HTTP server:

    #!/bin/sh

    echo "Serving at http://localhost:3000"
    python -m SimpleHTTPServer 3000


    I was wondering how I can enable or add a CORS header like Access-Control-Allow-Origin: * to this server?

    Continue reading...

Compartilhe esta Página