Running without a separate user content instance requires abuse of command line options.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
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
- 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.
- However, the flags
required-base-host-headeranduser-content-uriare required. - 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 functionDistribution.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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di haskell/hackage-server
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 22/100
haskell/hackage-server#1530 · 4 commenti · 2 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
haskell/hackage-server#1528 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
haskell/hackage-server#1523 ·
-
Count downloads from content delivery networkForse già presa @LaurentRDC l’ha presa 60 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
haskell/hackage-server#1517 · 1 commento ·
-
hackage-mirror can't mirror old packagesForse già presa @TTyChud l’ha presa 7 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 40/100
haskell/hackage-server#1515 ·
Tutte le issue di haskell/hackage-server
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
haskell/bytestring#730 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
seal-harness/seal-harness#399 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
fmidue/codeworld-tasks#124 ·
-
allow haskell-src-exts-1.24Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
reflex-frp/reflex#563 ·