How to disable same origin policy in cefpython?

334 Views Asked by At

I want to disable same-origin policy in cefpython while using pywebview. I tried below code according to this page:

from webview.platforms.cef import command_line_switches

command_line_switches.update({
     'disable_web_security': 'True' }) # if i try to put a bool as value, it shows expected bytes, not bool

if __name__ == "__main__":
   webview.create_window('', url='http://localhost:5000/')
   webview.start(gui='cef')

But this doesn't seem to solve the problem. I have an iframe of a different origin where I want to trigger a click event. If the security is enabled then it will throw an error with the same-origin policy message. Am I missing something? How can I solve this?

1

There are 1 best solutions below

7
On

Cefpython browser settings

Not even the debug with cef is working, I cannot even load an image in pywebview without start a local server!!! I will switch to pyqt

UPDATE

It is a server side security, not a browser security!