Commit c3501224 authored by Catalin Irimie's avatar Catalin Irimie Committed by Michael Kozono

Geo secondary proxying: serve assets locally

As Geo sites are required to be on the same version as the primary,
the assets should be the same, and at the same path, therefore
we can speed this up by serving them from the local secondary
when proxying is in use.

Changelog: changed
EE: true
parent 6feda25d
......@@ -397,6 +397,16 @@ func configureRoutes(u *upstream) {
// Internal API routes
u.route("", "^/api/v4/internal", defaultUpstream),
u.route(
"", `^/assets/`,
static.ServeExisting(
u.URLPrefix,
staticpages.CacheExpireMax,
assetsNotFoundHandler,
),
withoutTracing(), // Tracing on assets is very noisy
),
// Don't define a catch-all route. If a route does not match, then we know
// the request should be proxied.
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment