abiosoft / abiosoft/caddy-yaml

module name 'zstd': module value cannot be null

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
30
Forks
2
PR merge metrics
No merged PRs in 30d

Description

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: {} }```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.