abiosoft / abiosoft/caddy-yaml

module name 'zstd': module value cannot be null

Offen
#4 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
30
Forks
2
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Config in YAML:
```---
apps:
http:
servers:
srv0:
listen:
- ":443"
routes:
- match:
- host:
- sub.example.com
- handle:
- handler: encode
encodings:
gzip:
level: 9
zstd:
prefer:
- zstd
- gzip
- handler: file_server
- terminal: true
...
```

### Problem:
The YAML adapter translates this line `zstd:` into JSON `"zstd": null` resulting in the error.

### Fix:
Translating it into `"zstd": {}` fixes it.
So either config adapter needs to not output it `null` or caddy needs to load module even if its null.

### Workaround:
For now I'm replacing it with this line which is basically JSON in yaml which defeats the purpose of using YAML config
```encodings: { gzip: {level: 9}, zstd: {} }```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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