antedebaas / Viesti-Reports

DMARC & SMTP-TLS Reports processor and visualizer and BIMI file hoster
https://docs.viestireports.com/
GNU Affero General Public License v3.0
81 stars 16 forks source link

Template has absolute link to style.css #137

Closed rvd0167 closed 3 months ago

rvd0167 commented 3 months ago

File templates/base.html.twig line 8 has an absolute link to style.css If you place Viesti-Reports into a subdirectory this css will not be loaded (or a wrong one is loaded).

<link href="/style.css" rel="stylesheet">

If coorected in this twig, other pages have this problem. The html is not consistent in this.

antedebaas commented 3 months ago

If you put it in a subdirectory you’ll brake more than that. You also break the meta-sts policy file. This project is specifically intended to run on its own (sub) domain

rvd0167 commented 3 months ago

I tackled this by simply changing templates/base.html.twig The .htaccess is already setting the environment variable "BASE" for this.

<link href="/style.css" rel="stylesheet"> to:

<link href="{{ app.request.server.get('BASE') }}/style.css" rel="stylesheet">