Skip to content

markdown: wrong hostname in commit url with empty ROOT_URL #29404

Closed
@milahu

Description

@milahu

Description

when i leave ROOT_URL empty
then gitea uses http://localhost as hostname in commit urls
but gitea should produce urls without hostname

ping @KN4CK3R via #28909

repro https://try.gitea.io/milahu/test-gitea-markdown-wrong-commit-url

part of #19345

Gitea Version

1.21.6

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

gitea runs in a container on localhost, accessed from localhost
so gitea thinks that its hostname is "localhost", but that is wrong

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions