diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-12-05 18:06:21 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-12-05 18:06:21 +0200 |
| commit | 9259bc36791a7084ae33bcf0a698101ddb24d28f (patch) | |
| tree | 81f41efe302cf8381e282315ce209baf71d78d0f /Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs | |
| parent | 959b48659a8ad212add5927a43da7f5593c54249 (diff) | |
| download | Tango-9259bc36791a7084ae33bcf0a698101ddb24d28f.tar.gz Tango-9259bc36791a7084ae33bcf0a698101ddb24d28f.zip | |
Integrated CDN downloads to PPC and MS.
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs')
| -rw-r--r-- | Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs index 4c39aad80..f0239978f 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs @@ -32,7 +32,7 @@ namespace Tango.MachineService.Controllers private static List<PPCPendingUpload> _pendingUploads; private static List<PPCPendingUpdate> _pendingUpdates; private ActiveDirectoryManager _ad_manager; - private const int SQL_TEMP_CREDENTIALS_EXP_MINUTS = 20; + private const int SQL_TEMP_CREDENTIALS_EXP_MINUTS = 20; public class TokenObject { @@ -114,6 +114,11 @@ namespace Tango.MachineService.Controllers response.BlobAddress = blob.GenerateReadSignature(TimeSpan.FromMinutes(60)); + if (!String.IsNullOrWhiteSpace(MachineServiceConfig.CDN_ENDPOINT)) + { + response.CdnAddress = MachineServiceConfig.CDN_ENDPOINT + blob.Uri.AbsolutePath; + } + DbCredentials credentials = new DbCredentials(); using (SmoManager smo = new SmoManager()) @@ -197,6 +202,11 @@ namespace Tango.MachineService.Controllers response.BlobAddress = blob.GenerateReadSignature(TimeSpan.FromMinutes(60)); + if (!String.IsNullOrWhiteSpace(MachineServiceConfig.CDN_ENDPOINT)) + { + response.CdnAddress = MachineServiceConfig.CDN_ENDPOINT + blob.Uri.AbsolutePath; + } + DbCredentials credentials = new DbCredentials(); using (SmoManager smo = new SmoManager()) |
