Don't create dummy index.html for webapp #25
Downstream does not require webapp anymore
This commit is contained in:
committed by
Ilja Neumann
parent
565c6ee91d
commit
918f446bb1
@@ -0,0 +1,6 @@
|
||||
Change: Dummy index.html is not required anymore by upstream
|
||||
|
||||
The workaround was required as identifier webapp was mandatory, but
|
||||
we serve it from memory. This also introduces --disable-identifier-webapp flag.
|
||||
|
||||
https://github.com/owncloud/ocis-konnectd/issues/25
|
||||
@@ -153,6 +153,9 @@ KONNECTD_ALLOW_CLIENT_GUESTS
|
||||
KONNECTD_ALLOW_DYNAMIC_CLIENT_REGISTRATION
|
||||
: Allow dynamic OAuth2 client registration
|
||||
|
||||
KONNECTD_DISABLE_IDENTIFIER_WEBAPP
|
||||
: Disable built-in identifier-webapp to use a frontend hosted elsewhere. Per default we use the built-in webapp. If set to false --identifier-client-path must be provided, defaults to `true`
|
||||
|
||||
|
||||
#### Health
|
||||
|
||||
@@ -287,6 +290,9 @@ If you prefer to configure the service with commandline flags you can see the av
|
||||
--allow-dynamic-client-registration
|
||||
: Allow dynamic OAuth2 client registration
|
||||
|
||||
--disable-identifier-webapp
|
||||
: Disable built-in identifier-webapp to use a frontend hosted elsewhere. Per default we use the built-in webapp. If set to false --identifier-client-path must be provided, defaults to `true`
|
||||
|
||||
|
||||
#### Health
|
||||
|
||||
|
||||
@@ -298,5 +298,12 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"KONNECTD_ALLOW_DYNAMIC_CLIENT_REGISTRATION"},
|
||||
Destination: &cfg.Konnectd.AllowDynamicClientRegistration,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "disable-identifier-webapp",
|
||||
Usage: "Disable built-in identifier-webapp to use a frontend hosted elsewhere.",
|
||||
EnvVars: []string{"KONNECTD_DISABLE_IDENTIFIER_WEBAPP"},
|
||||
Value: true,
|
||||
Destination: &cfg.Konnectd.IdentifierWebAppDisabled,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,20 +70,6 @@ func NewService(opts ...Option) Service {
|
||||
}
|
||||
|
||||
func createConfigsIfNotExist(assets http.FileSystem) error {
|
||||
err := os.MkdirAll("/var/tmp/konnectd", 0700)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// This empty file is currently required to start konnect
|
||||
// See: https://github.com/Kopano-dev/konnect/issues/25
|
||||
index, err := os.Create("/var/tmp/konnectd/index.html")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
index.Close()
|
||||
|
||||
if _, err := os.Stat("./config"); os.IsNotExist(err) {
|
||||
if err := os.Mkdir("./config", 0700); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user