r/gitea: Handle encoded / characters in HTTP paths

Gitea package names (e.g. OCI images, etc.) can contain `/` charactres.
These are encoded as %2F in request paths.  Apache needs to forward
these sequences to the Gitea server without decoding them.
Unfortunately, the `AllowEncodedSlashes` setting, which controls this
behavior, is a per-virtualhost setting that is *not* inherited from the
main server configuration, and therefore must be explicitly set inside
the `VirtualHost` block.  This means Gitea needs its own virtual host
definition, and cannot rely on the default virtual host.
This commit is contained in:
2022-11-25 17:43:07 -06:00
parent c625b28d6d
commit 772f669ab2
4 changed files with 35 additions and 4 deletions

View File

@@ -74,10 +74,10 @@
enabled=yes
- name: ensure apache is configured to proxy for gitea
copy:
src=gitea.httpd.conf
dest=/etc/httpd/conf.d/gitea.conf
mode=0644
template:
src: gitea.httpd.conf.j2
dest: /etc/httpd/conf.d/gitea.conf
mode: u=rw,go=r
notify: reload httpd
- name: ensure selinux allows apache to proxy for gitea
seboolean: