Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: invalid value: cors.allow_origins=[] on new install since 0.13.0 #113

Open
mtoniott opened this issue Jan 2, 2025 · 1 comment
Open

Comments

@mtoniott
Copy link

mtoniott commented Jan 2, 2025

On new installs since 0.13.0, the server won't start and give the following error;

`[user@install]$ standardfile server -c /etc/standardfile.yaml

panic: invalid value: cors.allow_origins=[]
goroutine 1 [running]:
github.com/knadh/koanf/v2.(*Koanf).MustStrings(0xc00002c3c0?, {0xa61905, 0x12})
/home/runner/go/pkg/mod/github.com/knadh/koanf/v2@v2.1.1/getters.go:429 +0xc8
main.init.func3(0xc0000fa500?, {0xc00007c4c0?, 0x4?, 0xa5b9de?})
/home/runner/work/standardfile/standardfile/cmd/standardfile/main.go:189 +0x410
github.com/spf13/cobra.(*Command).execute(0xf163a0, {0xc00007c4a0, 0x2, 0x2})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:985 +0xaaa
github.com/spf13/cobra.(*Command).ExecuteC(0xc0000fc608)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041
main.main()
/home/runner/work/standardfile/standardfile/cmd/standardfile/main.go:52 +0x356
`

Any clue where the error comes from ?

@mdouchement
Copy link
Owner

There is an update on the config file:

cors:
# allow_origins of your self-hosted standardnotes/web:latest
allow_origins:
- http://localhost:3000 # Dev web app
allow_methods: ["GET", "HEAD", "PUT", "PATCH", "POST", "DELETE"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants