mirror of
https://github.com/httpjamesm/AnonymousOverflow.git
synced 2025-04-21 06:19:14 +00:00
feat: allow stackoverflow.com/q/ in posthome
This commit is contained in:
parent
dcf0805334
commit
e3d60d4d3e
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ func PostHome(c *gin.Context) {
|
||||||
|
|
||||||
// validate URL
|
// validate URL
|
||||||
isStackOverflow := strings.HasPrefix(soLink, "https://stackoverflow.com/questions/")
|
isStackOverflow := strings.HasPrefix(soLink, "https://stackoverflow.com/questions/")
|
||||||
isShortenedStackOverflow := strings.HasPrefix(soLink, "https://stackoverflow.com/a/")
|
isShortenedStackOverflow := strings.HasPrefix(soLink, "https://stackoverflow.com/a/") || strings.HasPrefix(soLink, "https://stackoverflow.com/q/")
|
||||||
isStackExchange := stackExchangeRegex.MatchString(soLink)
|
isStackExchange := stackExchangeRegex.MatchString(soLink)
|
||||||
if !isStackExchange && !isStackOverflow && !isShortenedStackOverflow {
|
if !isStackExchange && !isStackOverflow && !isShortenedStackOverflow {
|
||||||
c.HTML(400, "home.html", gin.H{
|
c.HTML(400, "home.html", gin.H{
|
||||||
|
|
Loading…
Add table
Reference in a new issue