Any way to directly add an Access-Control-Allow-Origin response header? #195
Answered
by
wang0618
quadratecode
asked this question in
Q&A
-
Is there any way to directly add an Access-Control-Allow-Origin response header? I tried to do it through pywebio.config() like so: config(js_code=""" document.head.appendChild( "<META HTTP-EQUIV=\\"Access-Control-Allow-Origin\\" CONTENT=\\"www.example.org\\">") """) However, this returns an error: "Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'" |
Beta Was this translation helpful? Give feedback.
Answered by
wang0618
Nov 8, 2021
Replies: 1 comment
-
Use jquery : |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
quadratecode
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use jquery :
config(js_code=""" $('head').append( '<META HTTP-EQUIV="Access-Control-Allow-Origin" CONTENT="www.example.org">') """)