url proxy fix

This commit is contained in:
2026-02-16 17:46:38 +01:00
parent 1750f5adb1
commit 7bc41118fd
5 changed files with 11 additions and 4 deletions

View File

@@ -45,7 +45,7 @@ app.UseCors("frontend");
app.UseAuthentication();
app.UseAuthorization();
app.MapHub<TestHub>("/testhub");
app.MapHub<WhiteboardHub>("/whiteboardhub");
app.MapHub<TestHub>("/hubs/test");
app.MapHub<WhiteboardHub>("/hubs/whiteboard");
app.Run();

View File

@@ -52,6 +52,8 @@ public class WorkerService : BackgroundService
try
{
await _dispatcher.Execute(message, ct);
Console.WriteLine($"OK: {message.GetType().Name}");
}
catch (ValidationException validationException)
{

View File

@@ -2,7 +2,7 @@ import {SignalRService} from "@/services/signalr.ts";
const client = new SignalRService(
`http://localhost:5039/testhub`,
`/hubs/test`,
);
export const testHubService = {

View File

@@ -1,7 +1,7 @@
import { SignalRService } from '@/services/signalr.ts'
import type { Rectangle, Whiteboard } from '@/types/whiteboard.ts'
const client = new SignalRService(`http://localhost:5039/whiteboardhub`)
const client = new SignalRService(`/hubs/whiteboard`)
export const whiteboardHubService = {
async connect() {

View File

@@ -21,6 +21,11 @@ export default defineConfig({
'/api': {
target: 'http://localhost:5266',
changeOrigin: true
},
'/hubs/': {
target: 'http://localhost:5039',
changeOrigin: true,
ws: true
}
}
},