add tls
This commit is contained in:
1 parent
7e89e7c4ba
commit
4c2371417b
6 files changed
+135
-13
No files matched your search
+1
-1
@@ -38,7 +38,7 @@ func (s staticDiskSource) Open(p string) (common.StaticSourceFile, error) {
|
||||
return &staticSourceFile{t}, nil
|
||||
}
|
||||
|
||||
func SetupHandler(e *gin.Engine, cfg common.ConfigHTTP) {
|
||||
func SetupHandler(e *gin.Engine, cfg *common.ConfigHTTP) {
|
||||
if cfg.StaticPath != nil {
|
||||
handler := common.NewStaticHandler(staticDiskSource{*cfg.StaticPath}, "index.html")
|
||||
e.NoRoute(func(c *gin.Context) {
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ func (s staticSource) Open(p string) (common.StaticSourceFile, error) {
|
||||
return &staticSourceFile{t}, nil
|
||||
}
|
||||
|
||||
func SetupHandler(e *gin.Engine, _ common.ConfigHTTP) {
|
||||
func SetupHandler(e *gin.Engine, _ *common.ConfigHTTP) {
|
||||
handler := common.NewStaticHandler(staticSource{"dist"}, "index.html")
|
||||
e.NoRoute(func(c *gin.Context) {
|
||||
encoding := c.Request.Header.Get("Accept-Encoding")
|
||||
|
||||
Reference in new issue
Block a user