增加请求域名动态返回云存储配置token
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-03-10 14:05:18 +08:00
parent 1a39d03c7e
commit 59be897fd8
4 changed files with 52 additions and 11 deletions
@@ -25,6 +25,7 @@ using Microsoft.Extensions.Options;
using Org.BouncyCastle.Tls;
using RestSharp;
using RestSharp.Authenticators;
using Serilog;
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -137,10 +138,15 @@ namespace IRaCIS.Api.Controllers
public async Task<IResponseOutput> GetObjectStoreTokenAsync([FromServices] IOptionsMonitor<ObjectStoreServiceOptions> options, [FromServices] IOSSService _oSSService)
{
var result = _oSSService.GetObjectStoreTempToken();
var domain = HttpContext.Request.Host.Host;
var result = _oSSService.GetObjectStoreTempToken(domain);
//result.AWS = await GetAWSTemToken(options.CurrentValue);
Log.Logger.Information($"使用域名:{domain}请求token.返回{result.ToJsonStr()}");
return ResponseOutput.Ok(result);
}