- commit
- 49f863d
- parent
- 4ee6d08
- author
- Eric Bower
- date
- 2025-01-20 17:35:33 -0500 EST
fix(prose): only proxy requests to pgs if an image
2 files changed,
+8,
-6
+7,
-5
1@@ -542,12 +542,14 @@ func AddPlusFeedForUser(dbpool db.DB, userID, email string) error {
2 text := fmt.Sprintf(`=: email %s
3 =: digest_interval 1day
4 => %s`, email, href)
5+ now := time.Now()
6 _, err = dbpool.InsertPost(&db.Post{
7- UserID: userID,
8- Text: text,
9- Space: "feeds",
10- Slug: "pico-plus",
11- Filename: "pico-plus",
12+ UserID: userID,
13+ Text: text,
14+ Space: "feeds",
15+ Slug: "pico-plus",
16+ Filename: "pico-plus",
17+ PublishAt: &now,
18 })
19 return err
20 }
+1,
-1
1@@ -875,7 +875,7 @@ func createSubdomainRoutes(staticRoutes []shared.Route) []shared.Route {
2 routes,
3 shared.NewRoute("GET", "/raw/(.+)", postRawHandler),
4 shared.NewRoute("GET", "/(.+).md", postRawHandler),
5- shared.NewRoute("GET", "/([^/]+)/(.+)", imgRequest),
6+ shared.NewRoute("GET", "/(.+.(?:jpg|jpeg|png|gif|webp|svg))/(.+)", imgRequest),
7 shared.NewRoute("GET", "/(.+.(?:jpg|jpeg|png|gif|webp|svg))$", imgRequest),
8 shared.NewRoute("GET", "/(.+).html", postHandler),
9 shared.NewRoute("GET", "/(.+)", postHandler),