diff --git a/DysonNetwork.Drive/Startup/ApplicationBuilderExtensions.cs b/DysonNetwork.Drive/Startup/ApplicationBuilderExtensions.cs
index 698dabe..ef2896b 100644
--- a/DysonNetwork.Drive/Startup/ApplicationBuilderExtensions.cs
+++ b/DysonNetwork.Drive/Startup/ApplicationBuilderExtensions.cs
@@ -15,7 +15,6 @@ public static class ApplicationBuilderExtensions
app.UseSwaggerUI();
}
- app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
diff --git a/DysonNetwork.Pass/Client/public/favicon.ico b/DysonNetwork.Pass/Client/public/favicon.ico
deleted file mode 100644
index df36fcf..0000000
Binary files a/DysonNetwork.Pass/Client/public/favicon.ico and /dev/null differ
diff --git a/DysonNetwork.Pass/Client/src/router/index.ts b/DysonNetwork.Pass/Client/src/router/index.ts
index 4e83c8c..413ea9b 100644
--- a/DysonNetwork.Pass/Client/src/router/index.ts
+++ b/DysonNetwork.Pass/Client/src/router/index.ts
@@ -8,6 +8,11 @@ const router = createRouter({
name: 'index',
component: () => import('../views/index.vue'),
},
+ {
+ path: '/captcha',
+ name: 'captcha',
+ component: () => import('../views/captcha.vue'),
+ }
],
})
diff --git a/DysonNetwork.Pass/Client/src/views/captcha.vue b/DysonNetwork.Pass/Client/src/views/captcha.vue
new file mode 100644
index 0000000..f30d490
--- /dev/null
+++ b/DysonNetwork.Pass/Client/src/views/captcha.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
Captcha provider not configured correctly.
+
+
+
+
+
Solar Network Anti-Robot
+
+
+
+
+
+
+
diff --git a/DysonNetwork.Pass/DysonNetwork.Pass.csproj b/DysonNetwork.Pass/DysonNetwork.Pass.csproj
index b2d23cc..872b9d3 100644
--- a/DysonNetwork.Pass/DysonNetwork.Pass.csproj
+++ b/DysonNetwork.Pass/DysonNetwork.Pass.csproj
@@ -149,6 +149,7 @@
+
diff --git a/DysonNetwork.Pass/Pages/Data/CaptchaPageData.cs b/DysonNetwork.Pass/Pages/Data/CaptchaPageData.cs
new file mode 100644
index 0000000..d9a382f
--- /dev/null
+++ b/DysonNetwork.Pass/Pages/Data/CaptchaPageData.cs
@@ -0,0 +1,20 @@
+using DysonNetwork.Shared.PageData;
+
+namespace DysonNetwork.Pass.Pages.Data;
+
+public class CaptchaPageData(IConfiguration configuration) : IPageDataProvider
+{
+ public bool CanHandlePath(PathString path) => path == "/captcha";
+
+ public Task> GetAppDataAsync(HttpContext context)
+ {
+ var provider = configuration.GetSection("Captcha")["Provider"]?.ToLower();
+ var apiKey = configuration.GetSection("Captcha")["ApiKey"];
+
+ return Task.FromResult>(new Dictionary
+ {
+ ["Provider"] = provider,
+ ["ApiKey"] = apiKey
+ });
+ }
+}
\ No newline at end of file
diff --git a/DysonNetwork.Pass/Program.cs b/DysonNetwork.Pass/Program.cs
index e571f69..2b32e21 100644
--- a/DysonNetwork.Pass/Program.cs
+++ b/DysonNetwork.Pass/Program.cs
@@ -34,6 +34,7 @@ builder.Services.AddAppBusinessServices(builder.Configuration);
builder.Services.AddAppScheduledJobs();
builder.Services.AddTransient();
+builder.Services.AddTransient();
var app = builder.Build();
diff --git a/DysonNetwork.Pass/Startup/ApplicationConfiguration.cs b/DysonNetwork.Pass/Startup/ApplicationConfiguration.cs
index da69c11..d9fa82e 100644
--- a/DysonNetwork.Pass/Startup/ApplicationConfiguration.cs
+++ b/DysonNetwork.Pass/Startup/ApplicationConfiguration.cs
@@ -33,7 +33,6 @@ public static class ApplicationConfiguration
app.UseWebSockets();
app.UseRateLimiter();
- app.UseHttpsRedirection();
app.UseAuthentication();
app.UseAuthorization();
app.UseMiddleware();
diff --git a/DysonNetwork.Pusher/Startup/ApplicationConfiguration.cs b/DysonNetwork.Pusher/Startup/ApplicationConfiguration.cs
index eacf9fa..7dc3f30 100644
--- a/DysonNetwork.Pusher/Startup/ApplicationConfiguration.cs
+++ b/DysonNetwork.Pusher/Startup/ApplicationConfiguration.cs
@@ -28,7 +28,6 @@ public static class ApplicationConfiguration
app.UseWebSockets();
app.UseRateLimiter();
- app.UseHttpsRedirection();
app.UseAuthentication();
app.UseAuthorization();
diff --git a/DysonNetwork.Shared/Proto/GrpcClientHelper.cs b/DysonNetwork.Shared/Proto/GrpcClientHelper.cs
index 05b3213..172fe05 100644
--- a/DysonNetwork.Shared/Proto/GrpcClientHelper.cs
+++ b/DysonNetwork.Shared/Proto/GrpcClientHelper.cs
@@ -93,7 +93,7 @@ public static class GrpcClientHelper
string? clientCertPassword = null
)
{
- var url = await GetServiceUrlFromEtcd(etcdClient, "DysonNetwork.File");
+ var url = await GetServiceUrlFromEtcd(etcdClient, "DysonNetwork.Drive");
return new FileService.FileServiceClient(CreateCallInvoker(url, clientCertPath, clientKeyPath,
clientCertPassword));
}
@@ -105,7 +105,7 @@ public static class GrpcClientHelper
string? clientCertPassword = null
)
{
- var url = await GetServiceUrlFromEtcd(etcdClient, "DysonNetwork.FileReference");
+ var url = await GetServiceUrlFromEtcd(etcdClient, "DysonNetwork.Drive");
return new FileReferenceService.FileReferenceServiceClient(CreateCallInvoker(url, clientCertPath, clientKeyPath,
clientCertPassword));
}
diff --git a/DysonNetwork.Sphere/Startup/ApplicationConfiguration.cs b/DysonNetwork.Sphere/Startup/ApplicationConfiguration.cs
index ee62b91..32a5e2b 100644
--- a/DysonNetwork.Sphere/Startup/ApplicationConfiguration.cs
+++ b/DysonNetwork.Sphere/Startup/ApplicationConfiguration.cs
@@ -31,7 +31,6 @@ public static class ApplicationConfiguration
app.UseWebSockets();
app.UseRateLimiter();
- app.UseHttpsRedirection();
app.UseAuthentication();
app.UseAuthorization();
app.UseMiddleware();