Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
The container registry cleanup task is now completed and the registry can be used normally.
Open sidebar
dcdb
dcdb
Commits
9084a00a
Commit
9084a00a
authored
May 24, 2019
by
Micha Mueller
Browse files
Fix collectagent. Should now run with new RestAPI
parent
dd0a1098
Changes
3
Hide whitespace changes
Inline
Side-by-side
collectagent/collectagent.cpp
View file @
9084a00a
...
@@ -515,7 +515,7 @@ int main(int argc, char* const argv[]) {
...
@@ -515,7 +515,7 @@ int main(int argc, char* const argv[]) {
* Start the HTTP Server for the REST API
* Start the HTTP Server for the REST API
*/
*/
CARestAPI
httpsServer
(
restAPISettings
,
&
mySensorCache
,
analyticsController
);
CARestAPI
httpsServer
(
restAPISettings
,
&
mySensorCache
,
analyticsController
);
config
->
readRestAPIUsers
(
&
httpsServer
);
config
.
readRestAPIUsers
(
&
httpsServer
);
httpsServer
.
start
();
httpsServer
.
start
();
LOG
(
info
)
<<
"HTTP Server running..."
;
LOG
(
info
)
<<
"HTTP Server running..."
;
...
...
collectagent/config/collectagent.conf
View file @
9084a00a
...
@@ -14,6 +14,20 @@ global {
...
@@ -14,6 +14,20 @@ global {
restAPI
{
restAPI
{
address
127
.
0
.
0
.
1
:
8080
address
127
.
0
.
0
.
1
:
8080
certificate
../../
deps
/
openssl
-
1
.
0
.
2
l
/
certs
/
demo
/
ca
-
cert
.
pem
privateKey
../../
deps
/
openssl
-
1
.
0
.
2
l
/
certs
/
demo
/
ca
-
cert
.
pem
dhFile
../../
deps
/
openssl
-
1
.
0
.
2
l
/
crypto
/
dh
/
dh2048
.
pem
user
admin
{
password
admin
PUT
GET
}
user
asdf
{
password
qwertz
GET
}
}
}
cassandra
{
cassandra
{
...
...
common/src/RESTHttpsServer.cpp
View file @
9084a00a
...
@@ -61,6 +61,7 @@ RESTHttpsServer::RESTHttpsServer(serverSettings_t settings) :
...
@@ -61,6 +61,7 @@ RESTHttpsServer::RESTHttpsServer(serverSettings_t settings) :
});
});
*/
*/
//TODO make more robust if certificate not found
_ctx
->
use_certificate_chain_file
(
settings
.
certificate
);
_ctx
->
use_certificate_chain_file
(
settings
.
certificate
);
_ctx
->
use_private_key_file
(
settings
.
privateKey
,
ssl
::
context
::
pem
);
_ctx
->
use_private_key_file
(
settings
.
privateKey
,
ssl
::
context
::
pem
);
_ctx
->
use_tmp_dh_file
(
settings
.
dhFile
);
_ctx
->
use_tmp_dh_file
(
settings
.
dhFile
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment