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

Expect to customize the httpServerPort configuration #7

Open
Martin91 opened this issue May 5, 2019 · 2 comments
Open

Expect to customize the httpServerPort configuration #7

Martin91 opened this issue May 5, 2019 · 2 comments

Comments

@Martin91
Copy link

Martin91 commented May 5, 2019

According to

httpServerPort: 8080,
, it is shown that the http server port for router endpoint is hardcoded and no any way to modify it.

That is, in my project, I have specified http-port="443"attribute for <server>, but it still log something like:

2019/05/05 18:59:24 [Info] Getting router config from http://xxxxxx.com:8080/cat/s/router?domain=Foo-Test&env=dev&hostname=martin-MacBook-Pro.local&ip=xx.xxx.xxx.xx&op=xml

Is this hardcode intentional?

@zmy366
Copy link

zmy366 commented May 6, 2019

自己改吧

第一步:
image
config.go中 添加HttpPort
HttpPort int xml:"http-port,attr"

第二步

image
config.go中parseXMLConfig插入一行代码
if index == 0 {
config.httpServerPort = x.HttpPort
}

@zhongyin
Copy link

zhongyin commented Sep 4, 2019

不支持修改配置文件路径,建议吧配置信息放到环境变量里面,方便读取。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants