ROOT_URL setting use the default as shown in conf/app.ini - #1823
Merged
Conversation
Member
|
Than just define the default the same way, these placeholders should be replaced automatically |
Contributor
Author
|
In which file are you referring to? setting.go? Nothing else is defined in that file in that way. |
Member
|
LGTM |
Member
|
make L-G-T-M work |
lafriks
reviewed
Jun 22, 2017
Member
There was a problem hiding this comment.
I think it should not add default ports to url depending on protocol (https 443 and http 80)
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
Author
|
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 <mike.fellows@shaw.ca>
Member
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The well commented conf/app.ini file that comes with the code shows the
ROOT_URL (i.e. setting.AppURL) as:
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 mike.fellows@shaw.ca