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)
|
||||
|
||||
// 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")
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user