Adding Legal Pages does not work anymore (files in "public" directory not accessible) #12202

Closed
opened 2025-11-02 10:01:59 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @King555a on GitHub (Dec 13, 2023).

Description

I created legal pages for my Gitea installation some time ago and it worked. I followed the documentation at https://docs.gitea.com/administration/adding-legal-pages

Today, after the update to 1.21.2, I noticed that the pages are not working anymore. I get a 404 error in the browser console and there is only a white page. The HTML files are still in the correct directory. I placed another (new) file there and it also did not work.

I don't know since which version this does not work anymore, maybe one of the last updates did this, not the current one.

Gitea Version

1.21.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.43.0

Operating System

Ubuntu 18.04.6 LTS x64

How are you running Gitea?

Installed as a package and running as a systemd service with https://gitlab.com/packaging/gitea

Database

MySQL/MariaDB

Originally created by @King555a on GitHub (Dec 13, 2023). ### Description I created legal pages for my Gitea installation some time ago and it worked. I followed the documentation at https://docs.gitea.com/administration/adding-legal-pages Today, after the update to 1.21.2, I noticed that the pages are not working anymore. I get a 404 error in the browser console and there is only a white page. The HTML files are still in the correct directory. I placed another (new) file there and it also did not work. I don't know since which version this does not work anymore, maybe one of the last updates did this, not the current one. ### Gitea Version 1.21.2 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.43.0 ### Operating System Ubuntu 18.04.6 LTS x64 ### How are you running Gitea? Installed as a package and running as a systemd service with https://gitlab.com/packaging/gitea ### Database MySQL/MariaDB
GiteaMirror added the type/bug label 2025-11-02 10:01:59 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Dec 14, 2023):

Yes, the document is outdated. You need to use path: /path/to/custom/public/assets/privacy.html

@wxiaoguang commented on GitHub (Dec 14, 2023): Yes, the document is outdated. You need to use path: /path/to/custom/public/**assets**/privacy.html
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12202