mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-22 14:34:54 -05:00
Creating a PR does not work with reverse proxy through IIS #720
Closed
opened 2025-11-02 03:34:04 -06:00 by GiteaMirror
·
5 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1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4.0-rc1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No Label
type/bug
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#720
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Avalancs on GitHub (May 18, 2017).
[x]):Description
On our server I reverse-proxy outside users from https protocol throught IIS to Gitea running on localhost with http. I also use the HTTP_X_FORWARDED_HOST, HTTP_X_FORWARDED_SCHEMA and HTTP_X_FORWARDED_PROTO fields in the headers from the following documentation (I followed the steps from "IIS reverse proxy" section, and applied the same for Gitea) https://confluence.jetbrains.com/display/YTD65/Configuring+Proxy .
If I try to create a pull reques from a repository (that takes me to the url
https://(gitea url)/(organization)/(repo)/compare/master...master) I get an HTTP404 response from IIS, but if I use Gitea from the server locally with the http local port it works just fine.
I will revert to using Gitea with the https protocol as it was meant to be. I actually needed IIS with reverse proxy for TeamCity and YouTrack because they would not handle SSL connections correctly, but Gitea works fine with HTTPS+certificate configured. But I am curious if anyone could provide some hint where to look, or if anyone is interested in this issue.
I also noticed yesterday that logs appear a few hours later in the gitea.log file, thus I am unable to provide logs right now. Maybe the output writer is buffered, or no flush operation is called?
@lunny commented on GitHub (May 18, 2017):
Could you paste your log via gist?
@bkcsoft commented on GitHub (May 19, 2017):
WRT logs not being written, do we need a "nothing has been written in X seconds, flush"-trigger?
@Avalancs commented on GitHub (May 23, 2017):
I'm sorry, I might have got confused over what we call logs. By gist do we mean the terminal window where gitea runs, or the gitea.log? The log does not have text in it yet, but the terminal has the following:
(So I logged in with gitea user, opened the Organization named First, then the repository GiteaRep and clicked on pull request)
[Macaron] 2017-05-23 11:29:30: Started GET /user/login for 192.168.20.6:64011
[Macaron] 2017-05-23 11:29:30: Completed /user/login 200 OK in 13.0007ms
[Macaron] 2017-05-23 11:29:35: Started POST /user/login for 192.168.20.6:64011
[Macaron] 2017-05-23 11:29:35: Completed /user/login 302 Found in 134.0304ms
[Macaron] 2017-05-23 11:29:36: Started GET / for 192.168.20.6:64011
[Macaron] 2017-05-23 11:29:36: Completed / 200 OK in 71.9995ms
[Macaron] 2017-05-23 11:29:36: Started GET /avatars/2 for 192.168.20.6:64011
[Macaron] [Static] Serving /2
[Macaron] 2017-05-23 11:29:36: Completed /avatars/2 200 OK in 59.9994ms
[Macaron] 2017-05-23 11:29:36: Started GET /avatars/1 for 192.168.20.6:64011
[Macaron] [Static] Serving /1
[Macaron] 2017-05-23 11:29:36: Completed /avatars/1 200 OK in 62.9986ms
[Macaron] 2017-05-23 11:29:41: Started GET /org/First/dashboard for 192.168.20.6:64011
[Macaron] 2017-05-23 11:29:41: Completed /org/First/dashboard 200 OK in 59.0004ms
[Macaron] 2017-05-23 11:29:41: Started GET /avatars/1 for 192.168.20.6:64011
[Macaron] [Static] Serving /1
[Macaron] 2017-05-23 11:29:41: Completed /avatars/1 200 OK in 6.9979ms
[Macaron] 2017-05-23 11:29:43: Started GET /First/GiteaRep for 192.168.20.6:64011
[Macaron] 2017-05-23 11:29:44: Completed /First/GiteaRep 200 OK in 559.0017ms
[Macaron] 2017-05-23 11:29:44: Started GET /avatars/1 for 192.168.20.6:64011
[Macaron] [Static] Serving /1
[Macaron] 2017-05-23 11:29:44: Completed /avatars/1 200 OK in 6.9997ms
[Macaron] 2017-05-23 11:29:44: Started GET /plugins/highlight-9.6.0/github.css for 192.168.20.6:64011
[Macaron] 2017-05-23 11:29:44: Started GET /plugins/highlight-9.6.0/highlight.pack.js for 192.168.20.6:64011
[Macaron] [Static] Serving /plugins/highlight-9.6.0/github.css
[Macaron] 2017-05-23 11:29:44: Completed /plugins/highlight-9.6.0/github.css 200 OK in 22.001ms
[Macaron] [Static] Serving /plugins/highlight-9.6.0/highlight.pack.js
[Macaron] 2017-05-23 11:29:44: Completed /plugins/highlight-9.6.0/highlight.pack.js 200 OK in 119.9988ms
[Macaron] 2017-05-23 11:29:50: Started GET /First/GiteaRep/pulls for 192.168.20.6:64011
[Macaron] 2017-05-23 11:29:50: Completed /First/GiteaRep/pulls 200 OK in 460.0035ms
[Macaron] 2017-05-23 11:29:50: Started GET /avatars/1 for 192.168.20.6:64011
[Macaron] [Static] Serving /1
[Macaron] 2017-05-23 11:29:50: Completed /avatars/1 200 OK in 95.9993ms
[Macaron] 2017-05-23 11:29:53: Started GET /favicon.ico for 192.168.20.6:64011
[Macaron] 2017-05-23 11:29:53: Completed /favicon.ico 404 Not Found in 10.9991ms
@Avalancs commented on GitHub (May 23, 2017):
Okay, so it is possible to set IIS to display more information about an error:
https://blogs.msdn.microsoft.com/webtopics/2008/05/27/iis-7-0-http-error-pages/
now I got a more definitive error message: 404.7
It links a nice info page now: https://support.microsoft.com/hu-hu/help/942045/error-message-when-you-try-to-browse-a-web-page-that-is-hosted-on-iis-7.0-http-error-404.7-file-extension-denied
(sorry the error page was localized in Hungarian, and I was unable to tell IIS to show it in english, so I will not post a screenshot)
Basically IIS thought master...master is a file, and .master is an extension, and it does not allow opening arbitrary files by default. I'll try if I can find what is needed to disable this for this particular site.
@Avalancs commented on GitHub (May 23, 2017):
The info page is disabling this check globally, so not a good solution... What I did was open up the site in IIS and under request filtering(?) I added .* to the allowed file extensions list, and removed the automatically added rejection to .master and it fixed the problem.