nodeSolidServer / nodeSolidServer/node-solid-server

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

Ouverte
#1,447 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
JavaScript
Étoiles
1.8k
Forks
308
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par localiser l’implémentation de l’option redirect-http-from et la configuration du serveur de redirection. Reproduisez les commandes avec un port, puis avec des ports séparés par des virgules ; c’est terminé lorsque l’en-tête Location utilise l’hôte et le port cible corrects, et que chaque port HTTP configuré est traité séparément.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
backend, cli
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
30/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.