sebpiq / WebPd

Run your Pure Data patches on the web.
GNU Lesser General Public License v3.0
933 stars 88 forks source link

Cross-Origin Request Blocked #118

Closed Abdallh7 closed 1 year ago

Abdallh7 commented 4 years ago

i try to apply the Webpd on my PC using XAMPP local host instead of python but i had a problem on my browser chrome and firfox , when i try to run one of the examples there nothing shows up only show loading... word , when i see the console show this message

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///C:/Users/Exhibits/Desktop/WebPd-master/WebPd-master/examples/metro/pd/main.pd. (Reason: CORS request not http)

also i want if there any video to see how webpd work thank you

atosystem commented 2 years ago

You should use http://localhost/... instead of file:///... because your webpage is served at hostname='localhost' not 'file'.

Or, there is a workaround: You can install Google Chrome plugin Allow CORS: Access-Control-Allow-Origin.

However, allowing cross-origin may expose your PC in security issues.