mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
fix DEP enrollment by setting configuration_web_url if empty (#10662)
https://github.com/fleetdm/fleet/issues/10661 - [x] Manual QA for all new/changed functionality
This commit is contained in:
parent
f5c8daacf0
commit
c1aa0f04b6
1 changed files with 7 additions and 0 deletions
|
|
@ -124,6 +124,13 @@ func (svc *Service) setDEPProfile(ctx context.Context, enrollmentProfile *fleet.
|
|||
// Override url with Fleet's enroll path (publicly accessible address).
|
||||
depProfileRequest.URL = enrollURL
|
||||
|
||||
// If the profile doesn't have a configuration_web_url, use Fleet's
|
||||
// enrollURL, otherwise the request for the enrollment profile is
|
||||
// submitted as a POST instead of GET.
|
||||
if depProfileRequest.ConfigurationWebURL == "" {
|
||||
depProfileRequest.ConfigurationWebURL = enrollURL
|
||||
}
|
||||
|
||||
depClient := apple_mdm.NewDEPClient(svc.depStorage, svc.ds, svc.logger)
|
||||
res, err := depClient.DefineProfile(ctx, apple_mdm.DEPName, &depProfileRequest)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue