Running without a separate user content instance requires abuse of command line options.

Aperta
#1,471 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
haskell
Ambito
backend

Direzione di ricerca

Inizia leggendo Distribution.Server.Framework.ServerEnv.requireUserContent e riproduci il comando segnalato dal commit 4231f36. Traccia il modo in cui required-base-host-header e user-content-uri interagiscono quando entrambi usano localhost:1024. Il lavoro è completato quando un’istanza locale attendibile può essere eseguita senza l’incongruo valore dell’opzione e le richieste al contenuto utente non entrano più in un reindirizzamento 301 infinito.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

  1. I wish to run a local instance of a Hackage server. This is a trusted environment, so I see no need for a separate user content instance. 
  2. However, the flags required-base-host-header and user-content-uri are required.
  3. Moreover, when they are set all to the same value, say localhost:1024, any request to user content will result in an infinite 301 redirect due to the logic of the function Distribution.Server.Framework.ServerEnv.requireUserContent.

This problem can be overcome by setting required-base-host-header to a nonsensical value. Any string other than the true base host header would do.

I think this should be re-designed. Either the problematic options should be made optional, or an equality check should be added to the problematic logic.

This is the exact command I am running:

hackage-server run --static-dir datafiles --user-content-uri 'http://localhost:1024' --base-uri 'http://localhost:1024' --required-base-host-header 'localhost:1024' --port 1024

The executable file is built from the commit 4231f36.

Lingua principale
Haskell
Stelle
471
Fork
228
Merge medio
5g 6h
PR unite (30g)
3

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di haskell/hackage-server

Tutte le issue di haskell/hackage-server

Issue simili

Altre issue su Haskell

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.