forked from gitea/gitea
1
0
Fork 0
gitea/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 Add restricted user filter to LDAP authentication (#10600) 2020-03-05 08:30:33 +02:00
admin_auth_ldap_test.go Add restricted user filter to LDAP authentication (#10600) 2020-03-05 08:30:33 +02:00
cert.go Add golangci (#6418) 2019-06-12 15:41:28 -04:00
cmd.go Sendmail command (#13079) 2020-10-24 16:38:14 -04:00
convert.go Move database settings from models to setting (#7806) 2019-08-24 11:24:45 +02:00
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 Implement "embedded" command to extract static resources (#9982) 2020-02-02 10:17:44 +08:00
embedded_stub.go Implement "embedded" command to extract static resources (#9982) 2020-02-02 10:17:44 +08:00
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 Add debug option to serv to help debug problems (#9492) 2019-12-25 23:44:57 +08:00
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 Graceful: Xorm, RepoIndexer, Cron and Others (#9282) 2019-12-15 09:51:28 +00:00
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