langflow
langflow copied to clipboard
Set backend URL independently of host and port
The backend URL string is currently inferred from port and host and set dynamically at startup. This breaks server deployments in docker containers because the frontend uses a different url than what's exposed to the backend via Docker because of reverse proxies.
Chrome gives the following error<your langflow deployment domain> was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://0.0.0.0:8080/all'. This request has been blocked; the content must be served over HTTPS.
This is an error we encountered this weekend and we managed to fix it for a certain use case. We'll probably release a version today that tries to remedy that.
This might fix the issue of deploying LangFlow as it is right now. Deploying frontend and backend separately will still require some more work.
Thanks for the heads up! If you have any more info on how you were planning to run LangFlow, please let us know.
@ogabrielluiz would you mind sharing your fix?
@ogabrielluiz would you mind sharing your fix?
It is released. Try upgrading LangFlow.
Langflow cli now has host and port options. If it doesn't work as intended write back and we'll work on it right away.
This is what allowed us to deploy LangFlow in HuggingFace Spaces so it should be working.
@ogabrielluiz tried two variations on fly.io and neither works:
FROM python:3.11-slim-buster
RUN pip install langflow
# CMD [ "langflow", "--host", "0.0.0.0", "--port", "8080" ] # this one gives the "<your langflow deployment domain> was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://0.0.0.0:8080/all'. This request has been blocked; the content must be served over HTTPS" error
CMD [ "langflow", "--host", "<langflow-deployment-name>.fly.dev", "--port", "8080" ] # this one gives [521] [ERROR] Invalid address: ('<langflow-deployment-name>.fly.dev', 8080)
I'm not familiar with fly.io but the setup seems close to HuggingFace Spaces.
The HTTPS error is something I've encountered in Spaces but ever since we made the fronted not send requests to the backend url it stopped happening.