美文网首页
python simplehttpserver跨域问题

python simplehttpserver跨域问题

作者: RunningJiang | 来源:发表于2020-10-26 23:02 被阅读0次

    本来按照网上的文章修改的跨域问题,结果还是不行。经过摸索修改如下:

    def end_headers(self):
            self.send_header('Access-Control-Allow-Origin', 'http://localhost:8080')
            self.send_header('Access-Control-Allow-Credentials','true')
            SimpleHTTPRequestHandler.end_headers(self)
    

    解决问题

    相关文章

      网友评论

          本文标题:python simplehttpserver跨域问题

          本文链接:https://www.haomeiwen.com/subject/vjbzmktx.html