Skip to content

"Clean up expired data" not working when hosting under a subpath #31285

Closed
@d-danilov

Description

@d-danilov

Description

When hosting under a subpath behind a reverse proxy (say, http://myserver.local/gitea as ROOT_URL), button "Clean up expired artifacts" in Site Administration->Code Assets->Packages (/admin/packages) does not work, resulting in a 404 instead.

The button POSTs to /admin/packages/cleanup, while expected to POST to /gitea/admin/packages/cleanup, where /gitea prefix is the subpath Gitea is being hosted on. If I manually add the subpath prefix to HTML via browser inspector, the button works, like this: <form method="post" action="/gitea/admin/packages/cleanup">

This seems to be due to missing usage of AppSubUrl here, like its used in other places.

Gitea Version

1.12.10

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Systemd

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions