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

App is hard-coded to use http://localhost:3000 #12

Closed
FarisZR opened this issue Feb 6, 2024 · 1 comment
Closed

App is hard-coded to use http://localhost:3000 #12

FarisZR opened this issue Feb 6, 2024 · 1 comment

Comments

@FarisZR
Copy link
Contributor

FarisZR commented Feb 6, 2024

Hey I'm running this behind a cloudflared tunnel, and I'm getting a 401 unauthorized when sending any message, however trying the service locally on the same server works fine.

Is there a way to enable a debug mode to see what the issue is?

The issue is that the app is just hardcoded to use http://localhost for everything internal.

@FarisZR FarisZR changed the title 401 behind cloudflared tunnel (need more verbose logs to investigate) App is hard-coded to use http://localhost Feb 8, 2024
@FarisZR FarisZR changed the title App is hard-coded to use http://localhost App is hard-coded to use http://localhost:3000 Feb 8, 2024
@Zaki-1052
Copy link
Owner

Updated, should be fixed now to be more flexible with the configurations!

  • By default, it still uses localhost:3000 (with OR statements), but if you set HOST and PORT in the .env file, it will use those for all internal links by sending the specified variables as a config file to the frontend.
  • Also set the base URLs for the endpoints, as the script is loaded, following the variable format http://{HOST}:{PORT}/{endpoint}, so it isn't hard-coded anymore and can adapt based on the config vars.
  • Added a line for running behind a proxy, which should help with your Cloudflare setup.
  • Updated input handling scheme to work with both GPT image arrays and text string messages via Mistral.

Should be good now, please test with your setup to make sure and reopen the issue if there's still a problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants