mirror of
https://github.com/httpjamesm/AnonymousOverflow.git
synced 2025-04-19 21:39:24 +00:00
14 lines
234 B
Go
14 lines
234 B
Go
package routes
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func StaticContent(c *gin.Context) {
|
|
cleanFilePath := strings.ReplaceAll(c.Param("filepath"), "..", "")
|
|
|
|
c.File(fmt.Sprintf("./public/%s", cleanFilePath))
|
|
}
|