This repository has been archived on 2024-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
forgejo/cmd
zeripath dd12384f22
Fix --port setting (#13288)
* Fix --port setting

Unfortunately there was an error in #13195 which set the --port
option before the settings were read. This PR fixes this by
moving applying this option to after the the settings are read

However, on looking further into this code I believe that the setPort
code was slightly odd.

Firstly, it may make sense to run the install page on a different
temporary port to the full system and this should be possible with
a --install-port option.

Secondy, if the --port option is provided we should apply it to both
otherwise there will be unusual behaviour on graceful restart

Thirdly, the documentation for --port says that the setting is
temporary - it should therefore not save its result to the configuration

(This however, does mean that authorized_keys and internal links may
not be correct. - I think we need to discuss this option further.)

Fix #13277

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update cmd/web.go

* Apply suggestions from code review

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-10-30 15:26:03 -04:00
..
admin.go Sendmail command (#13079) 2020-10-24 16:38:14 -04:00
admin_auth_ldap.go
admin_auth_ldap_test.go
cert.go
cmd.go Sendmail command (#13079) 2020-10-24 16:38:14 -04:00
convert.go
doctor.go Add command to recreate tables (#12407) 2020-09-06 22:52:01 +01:00
dump.go Add default storage configurations (#12813) 2020-09-29 12:05:13 +03:00
embedded.go
embedded_stub.go
generate.go TrimSpace when reading InternalToken from a file (#11502) 2020-05-20 19:16:06 +03:00
hook.go Move update-server-info to hooks (#12826) 2020-10-14 00:24:06 +08:00
keys.go
mailer.go Fix send mail (#13312) 2020-10-26 12:42:27 -04:00
manager.go Pause, Resume, Release&Reopen, Add and Remove Logging from command line (#11777) 2020-07-05 20:07:07 -04:00
migrate.go
migrate_storage.go Avatars and Repo avatars support storing in minio (#12516) 2020-10-14 21:07:51 +08:00
serv.go Add ssh certificate support (#12281) 2020-10-10 20:38:09 -04:00
web.go Fix --port setting (#13288) 2020-10-30 15:26:03 -04:00
web_graceful.go Move install pages out of main macaron routes (#13195) 2020-10-19 17:03:08 -04:00