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.
Reverse proxy must be configured to forward following headers to Starship server:
X-Forwarded-Proto: <protocol> More info
X-Forwarded-Host: <host> More info
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.
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.
If Starship server is receiving Forwarded headers, it ignores them if they are not received by a trusted reverse proxy.