HTTPS Redirection Issue with :80 Port Included After OIDC Authentication

Hello everyone,

I am encountering a challenging issue on my XWiki instance (version Jetty HSQLDB 15.10.1), hosted on a YunoHost server. After authenticating via OpenID Connect (OIDC), I am redirected to an HTTPS URL that incorrectly includes the port :80 (for example, https://mysite.example.com:80/xwiki/bin/admin/?srid=Flg6M7m5). This incorrect port inclusion leads to a “secure connection failure” in the browser, as :80 is not the appropriate port for HTTPS connections.

Context:

  • The XWiki instance, specifically version Jetty HSQLDB 15.10.1, is configured for OIDC authentication on a YunoHost server.
  • This issue arises immediately after the authentication phase, during redirection back to the XWiki interface.
  • The base URL (xwiki.home) within XWiki’s xwiki.cfg is set to https://mysite.example.com/xwiki, aiming for HTTPS without specifying a port.

Noteworthy Observation:

  • Manually removing :80 from the URL in the browser allows me to access the XWiki interface correctly, and I am found to be logged in successfully.

Attempted Solutions:

  1. The xwiki.home setting in xwiki.cfg is confirmed to be https://mysite.example.com:443/xwiki/, which seems correct, but the issue with the incorrect port remains.
  2. I implemented a specific Nginx configuration aiming to redirect or correct these URLs, as follows:
    server {
      listen 80;
      server_name mysite.example.com;
      return 301 https://$host$request_uri;
    }
    
    Unfortunately, this has not resolved the issue.

Seeking Guidance:
I am reaching out for any advice, insights, or solutions that the community might offer. If anyone has experienced a similar issue, or has suggestions on potential fixes, your input would be greatly appreciated.

Thank you for your time and assistance.

Hello everyone,

I’m just following up on my previous post regarding the HTTPS redirection issue with the :80 port after OIDC authentication on my XWiki 15.10.1 instance on YunoHost. I haven’t found a solution yet and would greatly appreciate any insights or suggestions you might have. Thank you for your time!