🐛 Bug fixes
This commit is contained in:
@@ -30,6 +30,7 @@ var sphereService = builder.AddProject<Projects.DysonNetwork_Sphere>("sphere")
|
|||||||
.WithReference(queue)
|
.WithReference(queue)
|
||||||
.WithReference(passService)
|
.WithReference(passService)
|
||||||
.WithReference(ringService)
|
.WithReference(ringService)
|
||||||
|
.WithReference(driveService)
|
||||||
.WithHttpHealthCheck()
|
.WithHttpHealthCheck()
|
||||||
.WithEndpoint(5001, 5001, "https", name: "grpc");
|
.WithEndpoint(5001, 5001, "https", name: "grpc");
|
||||||
var developService = builder.AddProject<Projects.DysonNetwork_Develop>("develop")
|
var developService = builder.AddProject<Projects.DysonNetwork_Develop>("develop")
|
||||||
|
@@ -69,48 +69,4 @@
|
|||||||
<ProjectReference Include="..\DysonNetwork.ServiceDefaults\DysonNetwork.ServiceDefaults.csproj" />
|
<ProjectReference Include="..\DysonNetwork.ServiceDefaults\DysonNetwork.ServiceDefaults.csproj" />
|
||||||
<ProjectReference Include="..\DysonNetwork.Shared\DysonNetwork.Shared.csproj" />
|
<ProjectReference Include="..\DysonNetwork.Shared\DysonNetwork.Shared.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Emails\AccountDeletionEmail.razor" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Emails\ContactVerificationEmail.razor" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Emails\EmailLayout.razor" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Emails\LandingEmail.razor" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Emails\PasswordResetEmail.razor" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Emails\VerificationEmail.razor" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\assets\index.css" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\assets\index.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\assets\nunito-cyrillic-ext-wght-normal.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\assets\nunito-cyrillic-wght-normal.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\assets\nunito-latin-ext-wght-normal.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\assets\nunito-latin-wght-normal.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\assets\nunito-vietnamese-wght-normal.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\assets\views.css" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\assets\views.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\dashboard-CKyaQQmB.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\FilePoolSelect-D8ZAn71O.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\files-2Q0pwjx0.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\files-CHYcO-Km.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\format-C50AaNwU.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\get-slot-BHg77tAu.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\index-8hxmE58t.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\index-C_waKLDa.css" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\not-found-BdXg6kdA.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-cyrillic-ext-wght-normal-D4X5GqEv.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-cyrillic-wght-normal-FdJpG9jw.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-latin-ext-wght-normal-ClTydo4B.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-latin-wght-normal-DYSs2pW_.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-vietnamese-wght-normal-U01xdrZh.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Progress-B8ihGGrN.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Result-DgdY1Zai.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Spin-D4Bv4qt0.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\src-CwPqR5Jy.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Tooltip-DobXE5MY.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\usage-BWFxWi2s.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\usage-DX5JiEks.css" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\use-locale-8xpNnStl.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\views-DAvwxRhD.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\favicon.png" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\index.html" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\index.html" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@@ -44,7 +44,10 @@ using (var scope = app.Services.CreateScope())
|
|||||||
await db.Database.MigrateAsync();
|
await db.Database.MigrateAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var tusDiskStore = app.Services.GetRequiredService<TusDiskStore>();
|
||||||
|
app.ConfigureAppMiddleware(tusDiskStore);
|
||||||
|
|
||||||
// Configure gRPC
|
// Configure gRPC
|
||||||
app.ConfigureGrpcServices();
|
app.ConfigureGrpcServices();
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
using DysonNetwork.Drive.Storage;
|
using DysonNetwork.Drive.Storage;
|
||||||
using Microsoft.Extensions.FileProviders;
|
|
||||||
using tusdotnet;
|
using tusdotnet;
|
||||||
using tusdotnet.Interfaces;
|
using tusdotnet.Interfaces;
|
||||||
|
|
||||||
@@ -18,7 +17,7 @@ public static class ApplicationBuilderExtensions
|
|||||||
|
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
|
|
||||||
app.UseCors(opts =>
|
app.UseCors(opts =>
|
||||||
opts.SetIsOriginAllowed(_ => true)
|
opts.SetIsOriginAllowed(_ => true)
|
||||||
.WithExposedHeaders("*")
|
.WithExposedHeaders("*")
|
||||||
@@ -27,7 +26,7 @@ public static class ApplicationBuilderExtensions
|
|||||||
.AllowAnyHeader()
|
.AllowAnyHeader()
|
||||||
.AllowAnyMethod()
|
.AllowAnyMethod()
|
||||||
);
|
);
|
||||||
|
|
||||||
app.MapTus("/api/tus", _ => Task.FromResult(TusService.BuildConfiguration(tusStore, app.Configuration)));
|
app.MapTus("/api/tus", _ => Task.FromResult(TusService.BuildConfiguration(tusStore, app.Configuration)));
|
||||||
|
|
||||||
return app;
|
return app;
|
||||||
|
@@ -39,8 +39,7 @@ public class FileController(
|
|||||||
}
|
}
|
||||||
|
|
||||||
var file = await fs.GetFileAsync(id);
|
var file = await fs.GetFileAsync(id);
|
||||||
if (file is null) return NotFound();
|
if (file is null) return NotFound("File not found.");
|
||||||
if (file.IsMarkedRecycle) return StatusCode(StatusCodes.Status410Gone, "The file has been recycled.");
|
|
||||||
|
|
||||||
if (file.Bundle is not null && !file.Bundle.VerifyPasscode(passcode))
|
if (file.Bundle is not null && !file.Bundle.VerifyPasscode(passcode))
|
||||||
return StatusCode(StatusCodes.Status403Forbidden, "The passcode is incorrect.");
|
return StatusCode(StatusCodes.Status403Forbidden, "The passcode is incorrect.");
|
||||||
@@ -75,7 +74,7 @@ public class FileController(
|
|||||||
case true when !file.HasThumbnail:
|
case true when !file.HasThumbnail:
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!original && file.HasCompression)
|
if (!original && file.HasCompression)
|
||||||
fileName += ".compressed";
|
fileName += ".compressed";
|
||||||
|
|
||||||
@@ -145,7 +144,7 @@ public class FileController(
|
|||||||
public async Task<ActionResult<CloudFile>> GetFileInfo(string id)
|
public async Task<ActionResult<CloudFile>> GetFileInfo(string id)
|
||||||
{
|
{
|
||||||
var file = await fs.GetFileAsync(id);
|
var file = await fs.GetFileAsync(id);
|
||||||
if (file is null) return NotFound();
|
if (file is null) return NotFound("File not found.");
|
||||||
|
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
@@ -293,13 +292,13 @@ public class FileController(
|
|||||||
if (pool is null) return BadRequest();
|
if (pool is null) return BadRequest();
|
||||||
if (!currentUser.IsSuperuser && pool.AccountId != accountId)
|
if (!currentUser.IsSuperuser && pool.AccountId != accountId)
|
||||||
return StatusCode(403, "You don't have permission to create files in this pool.");
|
return StatusCode(403, "You don't have permission to create files in this pool.");
|
||||||
|
|
||||||
if (!pool.PolicyConfig.EnableFastUpload)
|
if (!pool.PolicyConfig.EnableFastUpload)
|
||||||
return StatusCode(
|
return StatusCode(
|
||||||
403,
|
403,
|
||||||
"This pool does not allow fast upload"
|
"This pool does not allow fast upload"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pool.PolicyConfig.RequirePrivilege > 0)
|
if (pool.PolicyConfig.RequirePrivilege > 0)
|
||||||
{
|
{
|
||||||
if (currentUser.PerkSubscription is null)
|
if (currentUser.PerkSubscription is null)
|
||||||
@@ -320,7 +319,7 @@ public class FileController(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.Size > pool.PolicyConfig.MaxFileSize)
|
if (request.Size > pool.PolicyConfig.MaxFileSize)
|
||||||
{
|
{
|
||||||
return StatusCode(
|
return StatusCode(
|
||||||
@@ -328,7 +327,7 @@ public class FileController(
|
|||||||
$"File size {request.Size} is larger than the pool's maximum file size {pool.PolicyConfig.MaxFileSize}"
|
$"File size {request.Size} is larger than the pool's maximum file size {pool.PolicyConfig.MaxFileSize}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
var (ok, billableUnit, quota) = await qs.IsFileAcceptable(
|
var (ok, billableUnit, quota) = await qs.IsFileAcceptable(
|
||||||
accountId,
|
accountId,
|
||||||
pool.BillingConfig.CostMultiplier ?? 1.0,
|
pool.BillingConfig.CostMultiplier ?? 1.0,
|
||||||
@@ -373,4 +372,4 @@ public class FileController(
|
|||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -135,126 +135,4 @@
|
|||||||
<LastGenOutput>SharedResource.Designer.cs</LastGenOutput>
|
<LastGenOutput>SharedResource.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Alert-B2FSluOY.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Alert-BpKMqwss.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Alert-DTmb0Sgw.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Alert-DvM2xVbN.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\authorize-CDn2N2LM.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\authorize-CJXnHQxd.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\authorize-DHV7-8aO.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\authorize-dZl8sZky.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\authorize-x1XGuNl0.css" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Avatar-7bBXFYqd.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Avatar-DdpbxvYb.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Avatar-D_MBNIdG.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Avatar-FENaVzle.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\callback-4ABh1E9L.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\callback-BHdDa1RS.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\callback-D2gvcEWR.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\callback-TDa4jiA8.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\captcha-CHZUVdIk.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\captcha-D6UBfe8X.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\captcha-D9uzIi-C.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\captcha-DMR3K84c.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\captcha-TlMcxElg.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\CaptchaWidget-D5wD484e.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\CaptchaWidget-LqHDF0Bm.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\CaptchaWidget-nxAiuR8D.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\CaptchaWidget-xnhVxegn.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\CaptchaWidget-ZSSy1_MS.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Card-3CQ5hMIi.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Card-Bm8UR8wa.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Card-C4ZOuQYu.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Card-CeVymCuR.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Card-K5sJ0ti3.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\create-account-B6oUnTd5.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\create-account-CDr1rVfd.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\create-account-CxHpnOvK.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\create-account-EYf4P7T4.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\create-account-POd1mcUx.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\dashboard-C98Tn6-T.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\dashboard-DcZO2zWP.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\dashboard-Ddypammg.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\dashboard-E1FjEONz.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\dashboard-LoQB59cJ.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\index-964Yi0CV.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\index-ByqfQbbl.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\index-CFzrSPET.css" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\index-CKh4vLBr.css" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\index-DiRbRnS4.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\index-DV0K-h1x.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\index-e5_uYufX.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\index-OlazpMBG.css" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\info-BKcw8i0E.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\info-BWGGQKrM.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\info-CN2zvAgZ.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\info-DGp6o6bD.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\info-xQN_26a3.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Input-BStZQD4K.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Input-CZ7NsVfI.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Input-DPeldKtL.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Input-DXl3pOsk.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Input-m7BFdUHn.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\login-BeTGF59B.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\login-BfW3KWcS.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\login-Bn1Vi--K.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\login-BNk-r3QN.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\login-CuUht49V.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\not-found-BMgVDi16.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\not-found-BnHh8CK1.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\not-found-C7gS4N7g.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\not-found-jW5pncwI.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\not-found-sjl1-FUZ.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-cyrillic-ext-wght-normal-D4X5GqEv.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-cyrillic-wght-normal-FdJpG9jw.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-latin-ext-wght-normal-ClTydo4B.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-latin-wght-normal-DYSs2pW_.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-vietnamese-wght-normal-U01xdrZh.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\PersonRound-8S_mNAfZ.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\PersonRound-Bjvi_zVT.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\PersonRound-BX1iEtQl.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\PersonRound-CdcTMOpz.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\PersonRound-DgsR1USR.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\pfp-CjBu767l.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\pfp-CJGYtIrG.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\pfp-CQwKndsp.css" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\pfp-DlYGqw_1.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\pfp-hprSFU-u.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\pfp-WGjM2YVF.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Progress-BYkKGqxH.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Progress-Bz_alL0z.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Progress-C5JK2b-M.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Progress-Cq5Zdlxp.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Progress-I7OzLFHE.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Result-B64HNhI4.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Result-BKspndtr.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Result-DGJsK6kO.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Result-DWv3YAoa.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Result-wfz_zGlO.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\security-BPT8r8gR.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\security-BV0Kq4kg.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\security-CLO6F1QL.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\security-DSsaIooW.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\security-MhaVgRfO.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\spells-BAzEXQVO.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\spells-BkDaJJbe.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\spells-DFn1Mbcq.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\spells-DsoUguHQ.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\spells-uY5sY7b0.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Spin-BSOdyDlg.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Spin-CcHBrPmI.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Spin-DiPKacGY.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Spin-DWv_86Hk.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\Spin-n8pBfAvT.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\views-B5pO0Mty.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\views-BfxnUiQS.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\views-Clwfkju7.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\views-FC75oa3I.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\views-WkErGpGZ.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\favicon.png" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\index.html" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@@ -22,10 +22,11 @@ public static class KestrelConfiguration
|
|||||||
options.Limits.MaxRequestBodySize = maxRequestBodySize;
|
options.Limits.MaxRequestBodySize = maxRequestBodySize;
|
||||||
|
|
||||||
// gRPC
|
// gRPC
|
||||||
options.ListenAnyIP(5001, listenOptions =>
|
var grpcPort = int.Parse(configuration.GetValue<string>("GRPC_PORT", "5001"));
|
||||||
|
options.ListenAnyIP(grpcPort, listenOptions =>
|
||||||
{
|
{
|
||||||
listenOptions.Protocols = HttpProtocols.Http2;
|
listenOptions.Protocols = HttpProtocols.Http2;
|
||||||
|
|
||||||
var selfSignedCert = _CreateSelfSignedCertificate();
|
var selfSignedCert = _CreateSelfSignedCertificate();
|
||||||
listenOptions.UseHttps(selfSignedCert);
|
listenOptions.UseHttps(selfSignedCert);
|
||||||
});
|
});
|
||||||
@@ -43,7 +44,7 @@ public static class KestrelConfiguration
|
|||||||
|
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
static X509Certificate2 _CreateSelfSignedCertificate()
|
static X509Certificate2 _CreateSelfSignedCertificate()
|
||||||
{
|
{
|
||||||
using var rsa = RSA.Create(2048);
|
using var rsa = RSA.Create(2048);
|
||||||
@@ -64,7 +65,7 @@ public static class KestrelConfiguration
|
|||||||
var notAfter = notBefore.AddYears(1);
|
var notAfter = notBefore.AddYears(1);
|
||||||
|
|
||||||
var certificate = certRequest.CreateSelfSigned(notBefore, notAfter);
|
var certificate = certRequest.CreateSelfSigned(notBefore, notAfter);
|
||||||
|
|
||||||
// Export to PKCS#12 and load using X509CertificateLoader
|
// Export to PKCS#12 and load using X509CertificateLoader
|
||||||
var pfxBytes = certificate.Export(X509ContentType.Pfx);
|
var pfxBytes = certificate.Export(X509ContentType.Pfx);
|
||||||
return X509CertificateLoader.LoadPkcs12(pfxBytes, password: null);
|
return X509CertificateLoader.LoadPkcs12(pfxBytes, password: null);
|
||||||
|
@@ -121,56 +121,6 @@
|
|||||||
<Compile Remove="Auth\AppleAuthController.cs"/>
|
<Compile Remove="Auth\AppleAuthController.cs"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<_ContentIncludedByDefault Remove="app\publish\appsettings.json"/>
|
|
||||||
<_ContentIncludedByDefault Remove="app\publish\DysonNetwork.Sphere.deps.json"/>
|
|
||||||
<_ContentIncludedByDefault Remove="app\publish\DysonNetwork.Sphere.runtimeconfig.json"/>
|
|
||||||
<_ContentIncludedByDefault Remove="app\publish\DysonNetwork.Sphere.staticwebassets.endpoints.json"/>
|
|
||||||
<_ContentIncludedByDefault Remove="app\publish\Keys\Solian.json"/>
|
|
||||||
<_ContentIncludedByDefault Remove="app\publish\package-lock.json"/>
|
|
||||||
<_ContentIncludedByDefault Remove="app\publish\package.json"/>
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Account\Profile.cshtml"/>
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Auth\Authorize.cshtml"/>
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Auth\Callback.cshtml"/>
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Auth\Challenge.cshtml"/>
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Auth\Login.cshtml"/>
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Auth\SelectFactor.cshtml"/>
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Auth\VerifyFactor.cshtml"/>
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Checkpoint\CheckpointPage.cshtml"/>
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Spell\MagicSpellPage.cshtml"/>
|
|
||||||
<_ContentIncludedByDefault Remove="Keys\Solian.json"/>
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Index.cshtml" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Posts\PostDetail.cshtml" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Shared\_Layout.cshtml" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\_ViewImports.cshtml" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\_ViewStart.cshtml" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Emails\AccountDeletionEmail.razor" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Emails\ContactVerificationEmail.razor" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Emails\EmailLayout.razor" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Emails\LandingEmail.razor" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Emails\PasswordResetEmail.razor" />
|
|
||||||
<_ContentIncludedByDefault Remove="Pages\Emails\VerificationEmail.razor" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\index-CwhYnE7S.css" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\index-D09kXPgc.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-cyrillic-ext-wght-normal-D4X5GqEv.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-cyrillic-wght-normal-FdJpG9jw.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-latin-ext-wght-normal-ClTydo4B.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-latin-wght-normal-DYSs2pW_.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\nunito-vietnamese-wght-normal-U01xdrZh.woff2" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\PostItem-B-fBcnNf.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\posts-w-kbiv-Q.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\assets\views-Z9SFj0UP.js" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\favicon.png" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\image-broken.jpg" />
|
|
||||||
<_ContentIncludedByDefault Remove="wwwroot\dist\index.html" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<None Remove="..\DysonNetwork.Pass\Client\**" />
|
|
||||||
<Content Remove="..\DysonNetwork.Pass\Client\**" />
|
|
||||||
<Compile Remove="..\DysonNetwork.Pass\Client\**" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\DysonNetwork.ServiceDefaults\DysonNetwork.ServiceDefaults.csproj" />
|
<ProjectReference Include="..\DysonNetwork.ServiceDefaults\DysonNetwork.ServiceDefaults.csproj" />
|
||||||
<ProjectReference Include="..\DysonNetwork.Shared\DysonNetwork.Shared.csproj"/>
|
<ProjectReference Include="..\DysonNetwork.Shared\DysonNetwork.Shared.csproj"/>
|
||||||
|
@@ -25,7 +25,6 @@ public partial class PostService(
|
|||||||
ILogger<PostService> logger,
|
ILogger<PostService> logger,
|
||||||
FileService.FileServiceClient files,
|
FileService.FileServiceClient files,
|
||||||
FileReferenceService.FileReferenceServiceClient fileRefs,
|
FileReferenceService.FileReferenceServiceClient fileRefs,
|
||||||
RingService.RingServiceClient pusher,
|
|
||||||
PollService polls,
|
PollService polls,
|
||||||
Publisher.PublisherService ps,
|
Publisher.PublisherService ps,
|
||||||
WebReaderService reader
|
WebReaderService reader
|
||||||
@@ -943,7 +942,7 @@ public partial class PostService(
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sender = await accountsHelper.GetAccount(accountId);
|
var sender = await accountsHelper.GetAccount(accountId);
|
||||||
|
|
||||||
var members = await pub.GetPublisherMembers(post.PublisherId);
|
var members = await pub.GetPublisherMembers(post.PublisherId);
|
||||||
var queryRequest = new GetAccountBatchRequest();
|
var queryRequest = new GetAccountBatchRequest();
|
||||||
queryRequest.Id.AddRange(members.Select(m => m.AccountId.ToString()));
|
queryRequest.Id.AddRange(members.Select(m => m.AccountId.ToString()));
|
||||||
@@ -1015,4 +1014,4 @@ public static class PostQueryExtensions
|
|||||||
(e.Publisher.AccountId != null && userFriends.Contains(e.Publisher.AccountId.Value)) ||
|
(e.Publisher.AccountId != null && userFriends.Contains(e.Publisher.AccountId.Value)) ||
|
||||||
publishersId.Contains(e.PublisherId));
|
publishersId.Contains(e.PublisherId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -101,6 +101,7 @@ services:
|
|||||||
- "${DRIVE_PORT}"
|
- "${DRIVE_PORT}"
|
||||||
- "5001"
|
- "5001"
|
||||||
volumes:
|
volumes:
|
||||||
|
- "./Uploads:/app/uploads"
|
||||||
- "./settings/drive.json:/app/appsettings.json"
|
- "./settings/drive.json:/app/appsettings.json"
|
||||||
networks:
|
networks:
|
||||||
- "aspire"
|
- "aspire"
|
||||||
@@ -117,6 +118,8 @@ services:
|
|||||||
ConnectionStrings__queue: "nats://nats:${QUEUE_PASSWORD}@queue:4222"
|
ConnectionStrings__queue: "nats://nats:${QUEUE_PASSWORD}@queue:4222"
|
||||||
services__pass__http__0: "http://pass:${PASS_PORT}"
|
services__pass__http__0: "http://pass:${PASS_PORT}"
|
||||||
services__pass__grpc__0: "https://pass:5001"
|
services__pass__grpc__0: "https://pass:5001"
|
||||||
|
services__drive__http__0: "http://drive:${DRIVE_PORT}"
|
||||||
|
services__drive__grpc__0: "https://drive:5001"
|
||||||
services__ring__http__0: "http://ring:${RING_PORT}"
|
services__ring__http__0: "http://ring:${RING_PORT}"
|
||||||
services__ring__grpc__0: "https://ring:5001"
|
services__ring__grpc__0: "https://ring:5001"
|
||||||
OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889"
|
OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889"
|
||||||
@@ -150,6 +153,8 @@ services:
|
|||||||
expose:
|
expose:
|
||||||
- "${DEVELOP_PORT}"
|
- "${DEVELOP_PORT}"
|
||||||
- "5001"
|
- "5001"
|
||||||
|
volumes:
|
||||||
|
- "./settings/develop.json:/app/appsettings.json"
|
||||||
networks:
|
networks:
|
||||||
- "aspire"
|
- "aspire"
|
||||||
gateway:
|
gateway:
|
||||||
|
@@ -105,6 +105,7 @@ services:
|
|||||||
ConnectionStrings__queue: "nats://nats:${QUEUE_PASSWORD}@queue:4222"
|
ConnectionStrings__queue: "nats://nats:${QUEUE_PASSWORD}@queue:4222"
|
||||||
services__pass__http__0: "http://pass:${PASS_PORT}"
|
services__pass__http__0: "http://pass:${PASS_PORT}"
|
||||||
services__ring__http__0: "http://ring:${RING_PORT}"
|
services__ring__http__0: "http://ring:${RING_PORT}"
|
||||||
|
services__drive__http__0: "http://drive:${DRIVE_PORT}"
|
||||||
OTEL_EXPORTER_OTLP_ENDPOINT: "http://docker-compose-dashboard:18889"
|
OTEL_EXPORTER_OTLP_ENDPOINT: "http://docker-compose-dashboard:18889"
|
||||||
OTEL_EXPORTER_OTLP_PROTOCOL: "grpc"
|
OTEL_EXPORTER_OTLP_PROTOCOL: "grpc"
|
||||||
OTEL_SERVICE_NAME: "sphere"
|
OTEL_SERVICE_NAME: "sphere"
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
"RequireHttpsMetadata": true
|
"RequireHttpsMetadata": true
|
||||||
},
|
},
|
||||||
"Tus": {
|
"Tus": {
|
||||||
"StorePath": "Uploads"
|
"StorePath": "/app/uploads"
|
||||||
},
|
},
|
||||||
"Storage": {
|
"Storage": {
|
||||||
"PreferredRemote": "2adceae3-981a-4564-9b8d-5d71a211c873",
|
"PreferredRemote": "2adceae3-981a-4564-9b8d-5d71a211c873",
|
||||||
|
Reference in New Issue
Block a user