diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-05-30 18:25:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-30 18:25:11 +0800 |
commit | effad26c0e7348d27f7fdd1c0cbf120d7558cf67 (patch) | |
tree | f6e4bfa168d1de5adaa40f73c52849a3fb529469 /integrations | |
parent | d79c8bc30241c98e044de40aa673138e819f765f (diff) | |
download | gitea-effad26c0e7348d27f7fdd1c0cbf120d7558cf67.tar.gz gitea-effad26c0e7348d27f7fdd1c0cbf120d7558cf67.zip |
Improve assets handler middleware (#15961)
* Use route to serve assets but not middleware
* Fix build error with bindata tag
* convert path to absolute
* fix build
* reduce function stack
* Add tests for assets
* Remove test for assets because they are not generated
* Use a http function to serve assets
* Still use middleware to serve assets then less middleware stack for assets
* Move serveContent to original position
* remove unnecessary blank line change
* Fix bug for /assets* requests
* clean code
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'integrations')
-rw-r--r-- | integrations/links_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/integrations/links_test.go b/integrations/links_test.go index 3b9c245fc3..03229e10e1 100644 --- a/integrations/links_test.go +++ b/integrations/links_test.go @@ -35,6 +35,8 @@ func TestLinksNoLogin(t *testing.T) { "/user2/repo1", "/user2/repo1/projects", "/user2/repo1/projects/1", + "/assets/img/404.png", + "/assets/img/500.png", } for _, link := range links { |