-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Requests Blocked by CORS #719
Comments
Update: |
The UI isn’t blended with the backend at all. For my database and rest app my backend parent is a flex py-object which has all the pure python classes in that can’t be handled in pscript, then the browser just sends events to it. Essentially my entire app is in python and just the ui in pscript. You do (or at least did when I wrote my stuff) have to have a py-object root object for this.
From: Fury ***@***.***>
Sent: 27 January 2022 00:13
To: flexxui/flexx ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [flexxui/flexx] Requests Blocked by CORS (Issue #719)
*** [EXTERNAL] This message comes from an external organisation. Exercise caution when opening attachments or clicking links, especially from unknown senders. ***
Update:
I managed to get several asynchronous versions working, but I can for the life of me send a request to an external API. For starters, most request packages for python cant be compiled by PScript. Also, flexx uses a browser so it follows CORS. It blocks all requests to other domains. How am I supposed to build my app that relies on an API(like a lot of apps do), if the UI is blended in with the backend? Is there a way I can have a backend to the UI running that isn't compiled by PScript nor blocked by CORS?
—
Reply to this email directly, view it on GitHub<#719 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHAS4J2MDC3DLBE6YBTVRODUYCE2PANCNFSM5M2RPECA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
National House-Building Council (00320784), NHBC Services Limited (03067703) and NHBC Building Control Services Limited (01952969) are registered in England and Wales with their registered office at NHBC House, Davy Avenue, Knowlhill, Milton Keynes, Buckinghamshire MK5 8FP.
National House-Building Council is authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority.
This email message (including any attachments) is intended solely for the addressee and may contain confidential, proprietary or legally privileged information. If you have received this message in error, please send it back to us, and immediately and permanently delete it. Do not use, copy, disseminate, distribute or disclose the information contained in this message or in any attachment. We have taken all reasonable precautions to ensure that no viruses are transmitted with this message. However, we can accept no responsibility for any loss or damage resulting directly or indirectly from the use of this e-mail or its contents. Incoming and outgoing e-mails are subject to scanning and may be intercepted by our e-mail administrators.
For information about how we process data please see our privacy policy at www.nhbc.co.uk/Legal/PrivacyPolicy and for terms of use please see the terms at www.nhbc.co.uk/Legal.
|
I switched to Neutralino using a python backend extension, i like it a lot better than Flexx at it's current state after messing around with Flexx for about 6h. I am gonna keep a close eye on this project because when it comes out of beta it'll be fire. |
The tricky part with Flexx is that both the server and client code are in Python, so the look alike a lot. You have to be careful to separate that in your application. Also see the word of caution in the readme. On the server side (e..g. in PyWidget's) you can use the Python async constructs, and you could send requests with e.g. responder or httpx (both are async). On the client side (in most other widgets) you're actually writing JavaScript (via PScript), and you can use JavaScript requests. And yes, you are subject to the browser's security constraints.
To be honest, I am not actively developing Flexx anymore, so it will probably take a new developer to pull this out of beta, if ever. |
It isn't 100% clear to me how to write a flexx app based around asyncio.
I read through:
Was async ever integrated directly into flexx? I couldn't find the commit :P
The text was updated successfully, but these errors were encountered: