mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-12 04:55:39 +08:00
Make public facing URL and SCEP server URL configurable.
Degrade gracefully to disabling enrollment endpoint if either URL or SCEP url are not provided.
This commit is contained in:
@@ -6,7 +6,7 @@ type Service interface {
|
||||
Enroll() (Profile, error)
|
||||
}
|
||||
|
||||
func NewService(pushCertPath string, pushCertPass string, caCertPath string) (Service, error) {
|
||||
func NewService(pushCertPath string, pushCertPass string, caCertPath string, url string, scepUrl string) (Service, error) {
|
||||
pushTopic, err := GetPushTopicFromPKCS12(pushCertPath, pushCertPass)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -30,8 +30,8 @@ func NewService(pushCertPath string, pushCertPass string, caCertPath string) (Se
|
||||
}
|
||||
|
||||
return &service{
|
||||
Url: "https://micromdm.local:6443",
|
||||
SCEPUrl: "http://micromdm.local:2019/scep",
|
||||
Url: url,
|
||||
SCEPUrl: scepUrl,
|
||||
SCEPSubject: scepSubject,
|
||||
Topic: pushTopic,
|
||||
CACert: caCert,
|
||||
|
||||
Reference in New Issue
Block a user