Skip to content

Conversation

@MCF
Copy link
Contributor

@MCF MCF commented May 27, 2017

The well commented conf/app.ini file that comes with the code shows the
ROOT_URL (i.e. setting.AppURL) as:

ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/

However the installed custom/conf/app.ini file does not include this setting as
shown, and the default in the setting module was hard coded to
http://localhost:3000/ instead of what is shown above.

With this change the ROOT_URL will default to what is shown above if it is not
set in the custom/conf/app.ini.

Of course it is still possible to override the default by adding the ROOT_URL
setting to your custom/conf/app.ini file as usual.

Signed-off-by: Mike Fellows [email protected]

@lunny lunny added this to the 1.2.0 milestone May 27, 2017
@lunny lunny added the type/enhancement An improvement of existing functionality label May 27, 2017
@tboerger
Copy link
Member

Than just define the default the same way, these placeholders should be replaced automatically

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 27, 2017
@MCF
Copy link
Contributor Author

MCF commented May 27, 2017

In which file are you referring to? setting.go? Nothing else is defined in that file in that way.

@lunny
Copy link
Member

lunny commented Jun 22, 2017

LGTM

@lunny
Copy link
Member

lunny commented Jun 22, 2017

make L-G-T-M work

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 22, 2017
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should not add default ports to url depending on protocol (https 443 and http 80)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good suggestion. I had just recreated what was in conf/app.ini, but your refinement makes more sense and is probably what everyone would expect to happen.

I'll make that change.

@MCF MCF force-pushed the root_url_default branch from 07712c4 to 9d74b32 Compare June 22, 2017 05:14
@MCF
Copy link
Contributor Author

MCF commented Jun 22, 2017

I've made the requested change. Please let me know if you see any problems with it.

The well commented conf/app.ini file that comes with the code shows the
ROOT_URL (i.e. setting.AppURL) as:

    ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/

However the installed custom/conf/app.ini file does not include this setting as
shown, and the default in the setting module was hard coded to
http://localhost:3000/ instead of what is shown above.

With this change the ROOT_URL will default to what is shown above if it is not
set in the custom/conf/app.ini.

Of course it is still possible to override the default by adding the ROOT_URL
setting to your custom/conf/app.ini file as usual.

Signed-off-by: Mike Fellows <[email protected]>
@MCF MCF force-pushed the root_url_default branch from 9d74b32 to 1513730 Compare June 22, 2017 05:18
@lafriks
Copy link
Member

lafriks commented Jun 22, 2017

LGTM

@tboerger tboerger 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 Jun 22, 2017
@lunny lunny merged commit 32f1c41 into go-gitea:master Jun 22, 2017
@MCF MCF deleted the root_url_default branch June 23, 2017 13:24
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
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/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants