Closed H0llyW00dzZ closed 7 months ago
Example Output:
$ go run cmd/api/main.go
2024/04/07 13:52:07 [H0llyW00dzZ Firewall] [INFO] Connected to database: *********
2024/04/07 13:52:10 [H0llyW00dzZ Project] [INFO] Starting server on :8080
┌───────────────────────────────────────────────────┐
│ H0llyW00dzZ Project │
│ Fiber v2.52.4 │
│ http://127.0.0.1:8080 │
│ (bound on host 0.0.0.0 and port 8080) │
│ │
│ Handlers ............ 541 Processes ........... 1 │
│ Prefork ....... Disabled PID ............. 24324 │
└───────────────────────────────────────────────────┘
2024/04/07 13:52:18 [H0llyW00dzZ Project] [ERROR] Panic occurred: I'm an error
2024/04/07 13:52:18 [H0llyW00dzZ Project] [ERROR] Stack trace:
goroutine 46 [running]:
runtime/debug.Stack()
C:/Program Files/Go/src/runtime/debug/stack.go:24 +0x5e
This along with the other middleware suggested, are beyond the scope of the project.
Tell us about your feature request
As currently there is no helmet middleware for secure web apps, if anyone agrees, I can submit a PR for this.
Example:
Then, just call
registerRouteConfigMiddleware()
somewhere.Disclaimer