修复URL校验不严谨的问题
This commit is contained in:
parent
67155ff5c0
commit
644d8842b6
2
main.go
2
main.go
@ -24,7 +24,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const Version = "v0.3.0"
|
||||
const Version = "v0.3.1"
|
||||
|
||||
func main() {
|
||||
err := Run()
|
||||
|
@ -30,8 +30,8 @@ func Auth(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
|
||||
startWithUrls := []string{"/login", "/static", "/favicon.ico", "/logo.svg", "/asciinema"}
|
||||
|
||||
download := regexp.MustCompile(`/sessions/\w{8}(-\w{4}){3}-\w{12}/download`)
|
||||
recording := regexp.MustCompile(`/sessions/\w{8}(-\w{4}){3}-\w{12}/recording`)
|
||||
download := regexp.MustCompile(`^/sessions/\w{8}(-\w{4}){3}-\w{12}/download`)
|
||||
recording := regexp.MustCompile(`^/sessions/\w{8}(-\w{4}){3}-\w{12}/recording`)
|
||||
|
||||
return func(c echo.Context) error {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "next-terminal",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "^4.3.0",
|
||||
|
Loading…
Reference in New Issue
Block a user