nodeSolidServer / nodeSolidServer/node-solid-server

Server option --redirect-http-from doesn't redirect correctly

Offen
#1,447 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
JavaScript
Sterne
1.8k
Forks
308
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I'm using

/opt/solid $ solid -V
5.3.1

from the nodesolidserver/node-solid-server image on docker hub.

The documentation for solid start says:

--redirect-http-from [value] HTTP port or ','-separated ports to redirect to the solid server port (e.g. "80,8080").

If I start the server like this (using the default listen port for https on 8443)

solid start --redirect-http-from 8000

then I get a log message:

nss_1 | Thu, 16 Jul 2020 13:10:25 GMT solid:settings will redirect from port 8000 to port 8443

However, if I make a request to this port over HTTP, I get this:

$ curl -v http://localhost:8000
* Rebuilt URL to: http://localhost:8000/
*   Trying ::1...
* TCP_NODELAY set
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8000 (#0)
> GET / HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 302 Found
< X-Powered-By: Express
< Location: https://localhost,8000:8443/
< Vary: Accept
< Content-Type: text/plain; charset=utf-8
< Content-Length: 50
< Date: Thu, 16 Jul 2020 13:10:34 GMT
< Connection: keep-alive
<
* Connection #0 to host localhost left intact
Found. Redirecting to https://localhost,8000:8443/

It seems like this has incorrectly read the parameter when creating the redirect server.

Additionally, from the usage text and the code, it seems like you should be able to add multiple http listen ports:

solid start --redirect-http-from 8000,8080,8888

But I get this as an output:

nss_1 | Thu, 16 Jul 2020 13:15:55 GMT solid:settings will redirect from port 8000,8080,8888 to port 8443

In this case I would expect to get this message 3 times, once for each port.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die Implementierung der Option redirect-http-from und die Einrichtung des Redirect-Servers zu finden. Führe die Befehle mit einem Port und mit durch Kommas getrennten Ports erneut aus; abgeschlossen ist die Aufgabe, wenn der Location-Header den korrekten Host und Zielport verwendet und jeder konfigurierte HTTP-Port separat behandelt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
backend, cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.