|
@@ -108,11 +108,13 @@ func (c *Controller) HandleAny(ctx *gin.Context) {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- for idx := range c.Config.CustomFserve.Config {
|
|
|
- if incomingPath == c.Config.CustomFserve.Config[idx].Request {
|
|
|
- fmt.Print("Custom file server path hit.\n")
|
|
|
- ctx.Data(200, c.Config.CustomFserve.Config[idx].ContentType, c.Config.CustomFserve.Config[idx].FileData)
|
|
|
- return
|
|
|
+ if c.Config.CustomFserve != nil {
|
|
|
+ for idx := range c.Config.CustomFserve.Config {
|
|
|
+ if incomingPath == c.Config.CustomFserve.Config[idx].Request {
|
|
|
+ fmt.Print("Custom file server path hit.\n")
|
|
|
+ ctx.Data(200, c.Config.CustomFserve.Config[idx].ContentType, c.Config.CustomFserve.Config[idx].FileData)
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if c.Config.Caching {
|