Problem 1: Starship server is returning wrong URLs

This issue is most often present on a reverse proxy with SSL enabled.

Visit this URL:

https://<server url>/api

Then check if the response contains correct URLs. For example, you can get this result:

{
    "links": [
      {
          "rel": "Starship/token",
          "href": "http://<server url>:8080/api/token"
      }
    ]
}

f you see incorrect protocol (http, not https) or invalid host name in URL, it means either reverse proxy or Starship server are not configured correctly.

Problem 1.1 Reverse proxy is not sending Forwarded headers to Starship server

Reverse proxy must be configured to forward following headers to Starship server:

X-Forwarded-Proto: <protocol> More info

X-Forwarded-Host: <host> More info

Solution: Enable Forwarded header sending on reverse proxy

You can check if starship server is receiving Forwarded headers by enabling request logging. Edit StarshipServerSettings.json file and add this:

{
  "Logging": {
    "File": {
      "LogLevel": {
        "Finkit.Starship.Server.Logging.RequestLoggingMiddleware": "Debug"
      }
    }
  }
}

hen look at the Starship server logs and see if Forwarded headers are present in received HTTP requests. If server is not receiving headers, Forwarded header sending is not properly configured on the reverse proxy. You need to enable Forwarded header sending on reverse proxy.

Remove request logging

After you fix the problem don't forget to remove request logging. Request logging takes a lot of resources so do not forget to remove it.

Problem 1.2 Starship server does not trust reverse proxy

If Starship server is receiving Forwarded headers, it ignores them if they are not received by a trusted reverse proxy.