Skip to content

Commit

Permalink
fix(prose): /raw/ endpoints should take priority over aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
neurosnap committed Jun 17, 2023
1 parent d520b3d commit 494540f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prose/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,8 @@ func createMainRoutes(staticRoutes []shared.Route) []shared.Route {
shared.NewRoute("GET", "/([^/]+)/blog/index.xml", rssBlogHandler),
shared.NewRoute("GET", "/([^/]+)/feed.xml", rssBlogHandler),
shared.NewRoute("GET", "/([^/]+)/_styles.css", blogStyleHandler),
shared.NewRoute("GET", "/([^/]+)/(.+)", postHandler),
shared.NewRoute("GET", "/raw/([^/]+)/(.+)", postRawHandler),
shared.NewRoute("GET", "/([^/]+)/(.+)", postHandler),
)

return routes
Expand All @@ -875,8 +875,8 @@ func createSubdomainRoutes(staticRoutes []shared.Route) []shared.Route {

routes = append(
routes,
shared.NewRoute("GET", "/(.+)", postHandler),
shared.NewRoute("GET", "/raw/(.+)", postRawHandler),
shared.NewRoute("GET", "/(.+)", postHandler),
)

return routes
Expand Down

0 comments on commit 494540f

Please sign in to comment.