yavsc/src/Yavsc.Server/Yavsc.Server.csproj

38 lines
1.9 KiB
XML
Raw Normal View History

2025-07-14 18:58:04 +01:00
<Project Sdk="Microsoft.NET.Sdk">
2023-03-19 16:39:04 +00:00
<PropertyGroup>
2026-04-19 17:23:18 +01:00
<TargetFramework>net10.0</TargetFramework>
2023-03-19 16:39:04 +00:00
<ImplicitUsings>enable</ImplicitUsings>
2025-02-14 00:20:35 +00:00
<UserSecretsId>53bd70e8-ff81-497a-847f-a15fd8ea7a09</UserSecretsId>
2026-02-22 23:39:56 +00:00
<RootNamespace>Yavsc.Server</RootNamespace>
2026-05-28 22:18:26 +01:00
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
2026-05-24 20:55:29 +01:00
<RepositoryUrl>https://github.com/pazof/yavsc</RepositoryUrl>
2026-06-04 22:04:20 +01:00
<Library>true</Library>
2023-03-19 16:39:04 +00:00
</PropertyGroup>
<ItemGroup>
2026-05-30 18:20:17 +01:00
<PackageReference Include="Anthropic.SDK" />
2026-02-09 01:03:33 +00:00
<PackageReference Include="HigginsSoft.IdentityServer8.EntityFramework" />
2026-05-28 22:18:26 +01:00
<PackageReference Include="Magick.NET-Q8-AnyCPU" />
2025-07-14 18:58:04 +01:00
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" />
<PackageReference Include="HigginsSoft.IdentityServer8" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" />
Split Site:Audience into Site:ExternalUrl + Site:CorsAllowedOrigins The Site:Audience setting was conflating two distinct concepts: an OAuth JWT audience (a single resource identifier) and a CORS allow-list (an array of origins). Collapsing them caused several latent bugs: - OAuth/JWT validation expected a single string while CORS WithOrigins accepts an array. - Password-reset callback URLs and OAuth client RedirectUri/Origin were being built from what was meant to be an audience identifier, not a base URL. - Yavsc.Org's main CORS policy was hardcoded to '*', with no way to restrict it without code changes. Changes: - SiteSettings.Audience (string) replaced with CorsAllowedOrigins (IList<string>). - OAuth JWT Authority still reads Site:Authority; Audience now reads Site:ExternalUrl (Org only; Api/Blogs use ValidateAudience=false). - MailSender and AccountController build reset-callback URLs from Site:ExternalUrl. - ClientController uses Site:ExternalUrl for OAuth RedirectUri/Origin defaults on newly created clients. - Yavsc.Api and Yavsc.Blogs now read CORS origins from Site:CorsAllowedOrigins instead of hardcoded URLs. Add shared AddYavscCors / AddYavscJwtBearer extension methods in Yavsc.Server/Helpers/ServiceExtensions.cs to enforce a single configuration contract across all runtime services (Api, Blogs, Org). Fails closed when CorsAllowedOrigins is empty; fails fast at startup when Site:Authority is missing. Remove obsolete ConfigurationHelpers.GetAudience (no remaining callers). Local appsettings-*.json files (which carry deployment-specific values and are gitignored) must be updated to add Site:CorsAllowedOrigins.
2026-06-19 13:15:21 +01:00
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
2025-07-14 18:58:04 +01:00
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" />
<PackageReference Include="Microsoft.AspNetCore.Http.Features" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design">
2023-03-19 16:39:04 +00:00
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
2025-07-14 18:58:04 +01:00
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" />
<PackageReference Include="Google.Apis.Calendar.v3" />
<PackageReference Include="PayPalMerchantSDK" />
<PackageReference Include="RazorEngine.NetCore" />
<PackageReference Include="MailKit" />
<PackageReference Include="MimeKit" />
<PackageReference Include="pazof.rules" />
2023-03-19 16:39:04 +00:00
</ItemGroup>
<ItemGroup>
2026-02-28 21:17:54 +00:00
<ProjectReference Include="../Yavsc.Abstract/Yavsc.Abstract.csproj" />
2023-03-19 16:39:04 +00:00
</ItemGroup>
2026-06-15 02:55:22 +01:00
</Project>