Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documents for Gitea behind reverse proxy. Fix some small bugs (some URLs are generated without sub-path) #17320

Merged
merged 6 commits into from
Oct 16, 2021

Conversation

wxiaoguang
Copy link
Contributor

Many people meet problems when they try to setup Gitea in a sub-path behind a reverse proxy ( #17310 , and some chats in discord channels)

The fact is: Apache ProxyPassReverse only works for Location, Content-Location andd URI headers on HTTP redirect responses, it causes more problems than it resolves. Now all URLs generated by Gitee have the correct prefix AppSubURL. We do not need to set ProxyPassReverse.

So the PR updates the document and fix some small bugs (some URLs are generated without sub-path).

…nd URI headers on HTTP redirect responses, it causes more problems than it resolves. Now all URLs generated by Gitee have the correct prefix AppSubURL. We do not need to set `ProxyPassReverse`.
@wxiaoguang wxiaoguang added type/bug type/docs This PR mainly updates/creates documentation labels Oct 15, 2021
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Oct 15, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #17320 (2f2a377) into main (58cd55d) will increase coverage by 0.00%.
The diff coverage is 33.33%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #17320   +/-   ##
=======================================
  Coverage   45.27%   45.28%           
=======================================
  Files         781      781           
  Lines       87974    87974           
=======================================
+ Hits        39834    39841    +7     
+ Misses      41669    41664    -5     
+ Partials     6471     6469    -2     
Impacted Files Coverage Δ
routers/api/v1/org/member.go 19.78% <0.00%> (ø)
routers/web/user/notification.go 37.71% <0.00%> (ø)
routers/api/v1/api.go 78.33% <100.00%> (ø)
modules/queue/queue_channel.go 95.00% <0.00%> (-1.67%) ⬇️
models/issue_comment.go 51.89% <0.00%> (+0.29%) ⬆️
modules/queue/queue_bytefifo.go 59.88% <0.00%> (+0.59%) ⬆️
modules/queue/workerpool.go 48.85% <0.00%> (+0.76%) ⬆️
models/gpg_key_common.go 64.51% <0.00%> (+4.83%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58cd55d...2f2a377. Read the comment docs.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 15, 2021
@techknowlogick techknowlogick merged commit e18ea9e into go-gitea:main Oct 16, 2021
@wxiaoguang wxiaoguang deleted the fix-gitea-reverse-proxy branch October 16, 2021 18:19
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
…(some URLs are generated without sub-path) (go-gitea#17320)

* Apache `ProxyPassReverse` only works for Location, Content-Location and URI headers on HTTP redirect responses, it causes more problems than it resolves. Now all URLs generated by Gitee have the correct prefix AppSubURL. We do not need to set `ProxyPassReverse`.

* fix url param

* use AppSubURL instead of AppURL in api/v1

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants