2

I've installed Gitea on a Debian server and I'm using nginx as a reverse proxy and for the SSL setup.

When I visit my Gitea instance, some characters aren't displayed correctly. That are for example the ticks inside of checkboxes, but also some entries the the language selection menu.

For me this looks like the page isn't displayed in UTF-8.

However, in my nginx http block I've set charset UTF-8;.

When I curl -I https://domain.tld (without proxy) it shows me the header content-type: text/html; charset=UTF-8 correctly.

But when I curl -I https://git.domain.tld (with proxy) it won't show me this information.

(But for some reason I have two x-frame-options headers. SAMEORIGIN and DENY.)

inside my nginx vHost server block I have this location block for the proxy:

location / {
    proxy_pass http://localhost:3000;
}

I've already tried proxy_pass_header Content-Type; or charset UTF-8; inside the location block. This doesn't work either.

The full vHost configuration looks like this:

server {
    listen 443 ssl http2;

    server_name git.domain.tld;

    access_log /var/log/nginx/gitea-proxy_access.log;
    error_log /var/log/nginx/gitea-proxy_error.log;

    # SSL Certificates
    ssl_certificate /etc/letsencrypt/domain.tld/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/domain.tld/key.pem;
    ssl_trusted_certificate /etc/letsencrypt/domain.tld/ca.pem;

    # SSL Configurations
    include /etc/nginx/snippets.d/ssl.conf;

    # Security Headers
    include /etc/nginx/snippets.d/headers.conf;

    location / {
        proxy_pass http://localhost:3000;
    }
}

# Redirect HTTP to HTTPS
server {
    listen 80;
    #listen [::]:80;
    server_name git.domain.tld;
    return 301 https://$server_name$request_uri;

    access_log /var/log/nginx/gitea-proxy_access.log;
    error_log /var/log/nginx/gitea-proxy_error.log;
}

0 Answers0