mirror of
				https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
				synced 2025-10-31 18:05:30 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			302 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			302 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package server
 | |
| 
 | |
| import (
 | |
| 	"io/fs"
 | |
| 	"net/http"
 | |
| 
 | |
| 	"github.com/gofiber/fiber/v2"
 | |
| 	"github.com/gofiber/fiber/v2/middleware/filesystem"
 | |
| )
 | |
| 
 | |
| func static(fs *fs.FS) fiber.Handler {
 | |
| 	return filesystem.New(filesystem.Config{
 | |
| 		Root:   http.FS(*fs),
 | |
| 		Browse: false,
 | |
| 		Index:  "index.html",
 | |
| 		MaxAge: 3600,
 | |
| 	})
 | |
| }
 | 
