codeproject / CodeProject.AI-Server

CodeProject.AI Server is a self contained service that software developers can include in, and distribute with, their applications in order to augment their apps with the power of AI.
https://codeproject.github.io/codeproject.ai
Other
721 stars 159 forks source link

Server behind a reverse proxy has wrong Service Url #103

Closed mikegleasonjr closed 7 months ago

mikegleasonjr commented 7 months ago

Area of Concern

Describe the bug

Hosting codeproject ai server through docker, runs fine by itself. Putting a reverse proxy in front makes the Service Url to be wrong.

If I edit quickly the Service Url to remove the port, the UIO connects to the backend properly.

Expected behavior

service url to be: http://codeprojectai.home.lan

Screenshots

image

image

Your System (please complete the following information):

Additional context

Thanks

ninjamonkey198206 commented 7 months ago

I have had the same issue for some time, except that the connection fails again 10-20 sec after removing the port.

arychj commented 7 months ago

The issue is here. window.location.port will only return a value if running on a non-default port (aka not 80 or 443).

2.5.0 should be the most recent unaffected version.

Looks like @miguelangel-nubla already has a PR open for it.

ChrisMaunder commented 7 months ago

Fixed in next release