Mixed Content over HTTPS #1246

Closed
opened 2025-08-09 17:19:24 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @aaltotsky on 11/20/2016

I have to use HTTPS (with localhost) for server authentication using:

// Require SSL
services.Configure<MvcOptions>(options =>
{
options.Filters.Add(new RequireHttpsAttribute());
}); 

I'm using the UseWebpackDevMiddleware as:

app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions
                {
                    HotModuleReplacement = true
                });

When I open browser, I'm getting the following error:

Mixed Content: The page at 'https://localhost:44359/home' was loaded over HTTPS, but requested an insecure EventSource endpoint 'http://localhost:50286/__webpack_hmr'. This request has been blocked; the content must be served over HTTPS.

How could I instruct WebpackDevMiddleware to use HTTPS and not HTTP protocol? Is there a parameter that I should use?

*Originally created by @aaltotsky on 11/20/2016* I have to use HTTPS (with localhost) for server authentication using: ``` // Require SSL services.Configure<MvcOptions>(options => { options.Filters.Add(new RequireHttpsAttribute()); }); ``` I'm using the UseWebpackDevMiddleware as: ``` app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { HotModuleReplacement = true }); ``` When I open browser, I'm getting the following error: > Mixed Content: The page at 'https://localhost:44359/home' was loaded over HTTPS, but requested an insecure EventSource endpoint 'http://localhost:50286/__webpack_hmr'. This request has been blocked; the content must be served over HTTPS. How could I instruct WebpackDevMiddleware to use HTTPS and not HTTP protocol? Is there a parameter that I should use?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1246
No description provided.