kWeglinski/libretranslate-web

Issue with Nginx proxy manager, page wont load completly.

Opened this issue · 1 comments

I deployed your front end yesterday and I like it very much as it gives this clean look to LibreTranslate (which I self-host).

But for some reason, if I access the IP directly (no ssl/https), it works perfectly well.

image

As soon as I put it behind Nginx reverse proxy manager the page wont load correctly and looses its translation functionality.
image

It kills me, beacuse I havent actually changed anything and I would really like to be able to run it with SSL on.

Is any one able to check if this is an issue on my side?

I deployed it via portainer using stacks:

version: '3'
services:
libretranslate:
image: kweg/pole-libretranslate:latest
restart: unless-stopped
environment:
API: http://192.168.2.5:5000
# pick one of: 'pole' | 'light' | 'dark'
THEME: 'dark'
ports:
- 8090:80

Hey, sorry I didn't look into GitHub issues thinking nobody cares about this project. Now that I've picked it to add some features I found this GH issue!

Given that it works perfectly fine without reverse proxy -

  1. Are you using SSL? (https://translate.~) if so the browser won't allow you to connect to http://192.168.2.5:5000/ resource as it's not secured
  2. If not - I'd guess it's CORS issue. Meaning your API and Client has to be within same main domain. For example if you have translate.somedomain.com then your api would live in apitranslate.somedomain.com (same "somedomain.com") and then the CORS will let it pass, I don't remember what headers does the API send.

I've got it set with SSL and they are translate.domain and apitranslate.domain and it works great.

If the issue persists - share browser console.logs that you are getting. They should help us tackle the issue together :)