Closed beniroquai closed 3 years ago
@beniroquai I think you noticed this issue right at the same time we noticed! We believe HTTP API should be interactable from any origin; the lack of CORS middleware was on oversight.
allow_origins
value of *
. ~We may be able to get this into the upcoming 4.3 release~ unfortunately missed the window on 4.3, but it'll certainly by 4.4One more update on this issue (just for brevity). We were able to use ImJoy inside the Opentrons Jupyter notebook:
With this you can use all kinds of machine learning plugins :-)
Closing the issue for now (or was already closed..nice!:)
Overview
We are trying to interact with the opentrons API remotely and were already very successful with sending requests through python. Now we would like to integrate the API into the openflexure server system using the imjoy.io plugin environment. Wei, the creator of ImJoy and I tried creating a simple toggle-button plugin:
to remote control the opentrons within the plugin. The relevant code snippet is this here (a javascript post request as a ImJoy plugin):
When executing the plugin and sending the POST, we get the following error:
Implementation details
Wei suggested to implement the following fix inside the
app.py
(opentrons/robot-server/robot_server/service/app.py
):in order to disable CORS.
Do you think this is possible? Or is this a very user-specific case?
Design
-
Acceptance criteria
Solved, if we can remote control the opentrons through an ImJoy plugin.