Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward query params to dev server #35

Merged
merged 1 commit into from
Jul 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Vite.AspNetCore/Services/ViteDevMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System.Text.RegularExpressions;
using Microsoft.AspNetCore.Http.Extensions;
using Vite.AspNetCore.Utilities;

namespace Vite.AspNetCore.Services;
Expand Down Expand Up @@ -160,7 +161,7 @@ public async Task InvokeAsync(HttpContext context, RequestDelegate next)
context.Request.Method == HttpMethod.Get.Method)
{
// Get the request path
var path = context.Request.Path.Value;
var path = context.Request.GetEncodedPathAndQuery();
// Proxy the request to the Vite Dev Server.
await this.ProxyAsync(context, next, path);
}
Expand Down