Serving static assets from CDN

I am running gitea at https://www.noamross.net/gitea/ and trying to serve static assets from https://cdn.jsdelivr.net/gh/go-gitea/gitea@v1.10.1/public, which is serving successfully. However, despite setting this as STATIC_URL_PREFIX in my app.ini, assets still seem to be served from my server.

The relevant part of my app.ini is:

[server]
PROTOCOL         = http
DOMAIN           = noamross.net
HTTP_PORT        = 3500
ROOT_URL         = https://www.noamross.net/gitea
STATIC_URL_PREFIX = https://cdn.jsdelivr.net/gh/go-gitea/gitea@v1.10.1/public

When I go to my site and refresh the gitea home page, I see this in my gitea logs:

$ tail /home/logs/daemon_gitea.log
[Macaron] 2019-12-19 14:30:59: Completed GET /vendor/assets/lato-fonts/lato-bold.woff2 200 OK in 13.84706ms
[Macaron] 2019-12-19 14:30:59: Completed GET /vendor/assets/lato-fonts/lato-regular.woff2 200 OK in 17.55174ms
[Macaron] 2019-12-19 14:30:59: Started GET /vendor/assets/font-awesome/css/font-awesome.min.css for 108.179.57.67
[Macaron] [Static] Serving /vendor/assets/font-awesome/css/font-awesome.min.css
[Macaron] 2019-12-19 14:30:59: Completed GET /vendor/assets/font-awesome/css/font-awesome.min.css 200 OK in 4.84158ms
[Macaron] 2019-12-19 14:31:00: Started GET /css/index.css?v=c5f24915c6a012040a54d362e21156cf for 108.179.57.67
[Macaron] [Static] Serving /css/index.css
[Macaron] 2019-12-19 14:31:00: Completed GET /css/index.css?v=c5f24915c6a012040a54d362e21156cf 200 OK in 5.0775ms
[Macaron] 2019-12-19 14:31:00: Started GET /img/favicon.png for 108.179.57.67

And my browser network panes indicates that assets are being served from noamross.net/gitea.

I also tried this configuration, but it didn’t change the behavior:

STATIC_URL_PREFIX = https://cdn.jsdelivr.net
STATIC_ROOT_PATH  = /gh/go-gitea/gitea@v1.10.1/public

Does anyone have advice on what I can change or check to diagnose this problem? Or is it a reportable bug?


Relevant environment/version info:

  • Gitea version 1.10.1 built with go1.13.1 : bindata, sqlite, sqlite_unlock_notify
  • git version 2.23.0
  • Operating system: FreeBSD 11.3-RELEASE-p2
  • Database: SQLite

That’s a feature of v1.11, see https://github.com/go-gitea/gitea/pull/7911