Skip to content
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

CORS Missing Allow Origin when deployed using docker #347

Open
2 of 6 tasks
pktiuk opened this issue Dec 11, 2024 · 2 comments
Open
2 of 6 tasks

CORS Missing Allow Origin when deployed using docker #347

pktiuk opened this issue Dec 11, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@pktiuk
Copy link

pktiuk commented Dec 11, 2024

Description

There is a problem with verba when I deploy it on another machine (not on my local machine.

When I want to open Verba UI I I get stuck on Welcome to Verba Choose your deployment view.

image

Installation

  • pip install goldenverba
  • pip install from source
  • Docker installation

Weaviate Deployment

  • Local Deployment
  • Docker Deployment
  • Cloud Deployment

Configuration

Reader:
Chunker:
Embedder:
Retriever:
Generator:

Steps to Reproduce

You need 2 machines in your network:

  • Your local dev machine with IP: 192.168.0.100
  • Your strong server with IP 192.168.0.200

Steps:

  1. Deploy verba using docker compose from this repo docker compose up -d --build on your server machine
  2. Open http://192.168.0.200:8000 on your dev machine
  3. Press Docker option
  4. App is stuck

Additional context

Possible workaround is using ssh tunnels to access Verba ssh -L 8001:localhost:8000 [email protected], then website works under http://localhost:8001 on dev machine

@pktiuk pktiuk changed the title CORS Missing Allow Origin when deployed using docker CORS Missing Allow Origin when deployed using docker Dec 11, 2024
@thomashacker
Copy link
Collaborator

Hey thanks for the issue! This is because of this @middleware section

@app.middleware("http")

It checks if the requests have the same origin, since it's deployed on another machine it fails with the CORS error message. I'll think of a way to disable this, but for now the workaround would be to simply delete the whole custom middleware logic. Let me know if that works for you 🚀

@thomashacker thomashacker added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 11, 2024
@pktiuk
Copy link
Author

pktiuk commented Dec 18, 2024

@thomashacker

Thank you for fix. It helped me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants