gessnerfl / fake-smtp-server

A simple SMTP Server for Testing purposes. Emails are stored in an in-memory database and rendered in a Web UI
Apache License 2.0
424 stars 88 forks source link

if behind reverse proxy attachements are not working #526

Closed Stef4nBr closed 1 month ago

Stef4nBr commented 1 month ago

Hello, I am running fake-smtp-server as a docker container behind reverse proxy ( apache ). In order to get it running I specified:

 environment:
      - SERVER_SERVLET_CONTEXTPATH=/fake-smtp-server

Most of the application is working fine but attachments are pointing for example www.example.eu/api/emails/3/attachments/3 does ignoring my proxy mapping. Can you pls update the code so it takes this into account? : https://github.com/gessnerfl/fake-smtp-server/blob/main/webapp/src/components/email/email-attachment-panel.tsx

Also its happening for each href= property like favicon & logo https://github.com/gessnerfl/fake-smtp-server/blob/main/webapp/index.html

fakeSmtpBug

gessnerfl commented 1 month ago

@Stef4nBr it seems that support for reverse proxy got broken with the migration of the build tool to vite.

gessnerfl commented 1 month ago

@Stef4nBr this issue should be resolved with the upcoming version 2.4.0. Can you please retest and close the ticket if the issue is resolved.

Stef4nBr commented 1 month ago

Hi @gessnerfl thank you for quick response, just pulled 2.4.0 docker image and retested the issue: All upper mentioned href's are pointing correctly to attachments , logo , fav-icon Issue is not reproducible anymore.

Stef4nBr commented 1 month ago

Issue is not reproducible anymore.