fup: don't crash on view if we don't have a cheddar
Classic Go typed-nil bug.
This commit is contained in:
parent
fa086419c8
commit
d8e001922a
1 changed files with 3 additions and 1 deletions
|
@ -79,9 +79,11 @@ var (
|
||||||
AppRoot: viper.GetString("serve.app-root"),
|
AppRoot: viper.GetString("serve.app-root"),
|
||||||
StorageURL: bucketURL(),
|
StorageURL: bucketURL(),
|
||||||
RedirectToBlobstore: !viper.GetBool("serve.direct-only"),
|
RedirectToBlobstore: !viper.GetBool("serve.direct-only"),
|
||||||
Highlighter: highlighter,
|
|
||||||
AuthMiddleware: fuphttp.TokenAuthMiddleware(viper.GetString("serve.auth.token"), viper.GetString("serve.auth.realm")),
|
AuthMiddleware: fuphttp.TokenAuthMiddleware(viper.GetString("serve.auth.token"), viper.GetString("serve.auth.realm")),
|
||||||
}
|
}
|
||||||
|
if highlighter != nil {
|
||||||
|
cfg.Highlighter = highlighter
|
||||||
|
}
|
||||||
a, err := fuphttp.New(ctx, cfg)
|
a, err := fuphttp.New(ctx, cfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("constructing application: %w", err)
|
return fmt.Errorf("constructing application: %w", err)
|
||||||
|
|
Loading…
Reference in a new issue