mywordpress-io / caddy-vault-storage

MIT License
2 stars 1 forks source link

Resolve circular dependency in Storage construction #2

Closed sundbry closed 8 months ago

sundbry commented 9 months ago

UnmarshalConfig runs before Provision hook (see https://caddyserver.com/docs/extending-caddy#module-lifecycle). This code was segfaulting in UnmarshalConfig when it attempted to dereference a nil s.Storage pointer.

Resolve the circular dependency between s.Storage.Storage being constructed with it's own pointer to s.Storage.StorageConfig.

Resolves #1