cors not working? #219
-
Hi, i am trying to make something simple but i run into cors issues when i post something to /control the browser gives an cors error, in the response headers there in no mention of allow origins headers (or any response headers). What am i missing here? from microdot import Microdot, send_file, Request,Response import json app = Microdot() @app.route('/') @app.route('/favicon.ico') @app.route('/assets/') @app.route('/control/',methods=["GET", "POST","OPTIONS"]) print(f'{ red } { green } { blue } ' ) @app.route('/shutdown') app.run(debug=True) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
the response headers: HTTP/1 200 OK |
Beta Was this translation helpful? Give feedback.
-
and solved the example says allowed_origins=['https://example.org'] but in case of * it shoul be allowed_origins='*'. dunno if this is always the case |
Beta Was this translation helpful? Give feedback.
That is correct. A list of domains or
'*'
for all domains.