mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
parent
11b671423c
commit
e066ad23cc
@ -76,7 +76,8 @@ func handlePageRequest(c *gin.Context) {
|
|||||||
p := Open(page)
|
p := Open(page)
|
||||||
|
|
||||||
// Disallow anything but viewing locked/encrypted pages
|
// Disallow anything but viewing locked/encrypted pages
|
||||||
if (p.IsEncrypted || p.IsLocked) && command[0:2] != "/v" {
|
if (p.IsEncrypted || p.IsLocked) &&
|
||||||
|
(command[0:2] != "/v" && command[0:2] != "/r") {
|
||||||
c.Redirect(302, "/"+page+"/view")
|
c.Redirect(302, "/"+page+"/view")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user