url proxy fix
This commit is contained in:
@@ -45,7 +45,7 @@ app.UseCors("frontend");
|
|||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
||||||
app.MapHub<TestHub>("/testhub");
|
app.MapHub<TestHub>("/hubs/test");
|
||||||
app.MapHub<WhiteboardHub>("/whiteboardhub");
|
app.MapHub<WhiteboardHub>("/hubs/whiteboard");
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
@@ -52,6 +52,8 @@ public class WorkerService : BackgroundService
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await _dispatcher.Execute(message, ct);
|
await _dispatcher.Execute(message, ct);
|
||||||
|
|
||||||
|
Console.WriteLine($"OK: {message.GetType().Name}");
|
||||||
}
|
}
|
||||||
catch (ValidationException validationException)
|
catch (ValidationException validationException)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {SignalRService} from "@/services/signalr.ts";
|
|||||||
|
|
||||||
|
|
||||||
const client = new SignalRService(
|
const client = new SignalRService(
|
||||||
`http://localhost:5039/testhub`,
|
`/hubs/test`,
|
||||||
);
|
);
|
||||||
|
|
||||||
export const testHubService = {
|
export const testHubService = {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { SignalRService } from '@/services/signalr.ts'
|
import { SignalRService } from '@/services/signalr.ts'
|
||||||
import type { Rectangle, Whiteboard } from '@/types/whiteboard.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 = {
|
export const whiteboardHubService = {
|
||||||
async connect() {
|
async connect() {
|
||||||
|
|||||||
@@ -21,6 +21,11 @@ export default defineConfig({
|
|||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://localhost:5266',
|
target: 'http://localhost:5266',
|
||||||
changeOrigin: true
|
changeOrigin: true
|
||||||
|
},
|
||||||
|
'/hubs/': {
|
||||||
|
target: 'http://localhost:5039',
|
||||||
|
changeOrigin: true,
|
||||||
|
ws: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user