19 lines
1.2 KiB
C#
19 lines
1.2 KiB
C#
|
|
namespace WordVersioning.Api.Services;
|
||
|
|
|
||
|
|
/// <summary>config ของ "open link" — ลิงก์เปิดไฟล์อายุสั้นที่ออกโดย backend เอง
|
||
|
|
/// bind จาก section "OpenLinks" ใน appsettings/env (rule: ห้าม hardcode)</summary>
|
||
|
|
public class OpenLinkOptions
|
||
|
|
{
|
||
|
|
public const string SectionName = "OpenLinks";
|
||
|
|
|
||
|
|
/// <summary>secret ใช้เซ็น HMAC ของ token — deploy จริงต้องตั้งค่าเป็นค่าลับจริง (env: OpenLinks__Secret)</summary>
|
||
|
|
public string Secret { get; set; } = string.Empty;
|
||
|
|
|
||
|
|
/// <summary>base URL ที่ใช้ประกอบเป็นลิงก์ (ต้องเป็น https — Word รุ่นใหม่เมิน URL ที่เป็น http เงียบๆ)
|
||
|
|
/// เช่น dev = https://localhost:7232 · prod = https://api.example.com</summary>
|
||
|
|
public string BaseUrl { get; set; } = string.Empty;
|
||
|
|
|
||
|
|
/// <summary>อายุของลิงก์ (วินาที) — สั้นๆ ตามนโยบายเดียวกับ presigned เดิม</summary>
|
||
|
|
public int ExpirySeconds { get; set; } = 120;
|
||
|
|
}
|