Find bugs in nopCommerce 4.30 RC and earn $10

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 3 ans
ibridge.support wrote:
Small Issue with Customer Tier Pricing Roles


Thanks for your investigation. We accidentally broke role filtering. Fixed now.
Il y a 3 ans
When will the official version be released
Il y a 3 ans
We plan to release 4.30 RTM this Friday (May 15th) and Monday (May 18th)
Il y a 3 ans
thanks  RomanovM ,   thats excellent news
Il y a 3 ans
On the face of it, It appears we need this at the beginning of Startup.Configure, in order for SSL to work behind Nginx on Linux. Otherwise I experience '301 moved permanently errors' and 'too many redirects' when SSL is enabled on the store.

As per the MS documentation for hosting NET CORE 3.1 on Linux with Nginx

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-3.1

Because requests are forwarded by reverse proxy, use the Forwarded Headers Middleware from the Microsoft.AspNetCore.HttpOverrides package. The middleware updates the Request.Scheme, using the X-Forwarded-Proto header, so that redirect URIs and other security policies work correctly.


 using Microsoft.AspNetCore.HttpOverrides;

app.UseForwardedHeaders(new ForwardedHeadersOptions
{
    ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});
Il y a 3 ans
Hi, JonQuick.
Did you try to enable the UseHttpXForwardedProto setting in the appsettings.json, is it not helping work with HTTPS on Linux?

JonQuick wrote:
On the face of it, It appears we need this at the beginning of Startup.Configure, in order for SSL to work behind Nginx on Linux. Otherwise I experience '301 moved permanently errors' and 'too many redirects' when SSL is enabled on the store.

As per the MS documentation for hosting NET CORE 3.1 on Linux with Nginx

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-3.1

Because requests are forwarded by reverse proxy, use the Forwarded Headers Middleware from the Microsoft.AspNetCore.HttpOverrides package. The middleware updates the Request.Scheme, using the X-Forwarded-Proto header, so that redirect URIs and other security policies work correctly.


 using Microsoft.AspNetCore.HttpOverrides;

app.UseForwardedHeaders(new ForwardedHeadersOptions
{
    ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});
Il y a 3 ans
It works under ubuntu SSL behind cloudflare.
I suggest SSL should be mentioned under install documents.

Sergei-k wrote:
Hi, JonQuick.
Did you try to enable the UseHttpXForwardedProto setting in the appsettings.json, is it not helping work with HTTPS on Linux?

On the face of it, It appears we need this at the beginning of Startup.Configure, in order for SSL to work behind Nginx on Linux. Otherwise I experience '301 moved permanently errors' and 'too many redirects' when SSL is enabled on the store.

As per the MS documentation for hosting NET CORE 3.1 on Linux with Nginx

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-3.1

Because requests are forwarded by reverse proxy, use the Forwarded Headers Middleware from the Microsoft.AspNetCore.HttpOverrides package. The middleware updates the Request.Scheme, using the X-Forwarded-Proto header, so that redirect URIs and other security policies work correctly.


 using Microsoft.AspNetCore.HttpOverrides;

app.UseForwardedHeaders(new ForwardedHeadersOptions
{
    ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});
Il y a 3 ans
Sergei-k wrote:
Hi, JonQuick.
Did you try to enable the UseHttpXForwardedProto setting in the appsettings.json, is it not helping work with HTTPS on Linux?

On the face of it, It appears we need this at the beginning of Startup.Configure, in order for SSL to work behind Nginx on Linux. Otherwise I experience '301 moved permanently errors' and 'too many redirects' when SSL is enabled on the store.

As per the MS documentation for hosting NET CORE 3.1 on Linux with Nginx

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-3.1

Because requests are forwarded by reverse proxy, use the Forwarded Headers Middleware from the Microsoft.AspNetCore.HttpOverrides package. The middleware updates the Request.Scheme, using the X-Forwarded-Proto header, so that redirect URIs and other security policies work correctly.


 using Microsoft.AspNetCore.HttpOverrides;

app.UseForwardedHeaders(new ForwardedHeadersOptions
{
    ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});




Hi Sergei-k,

I had overlooked this "UseHttpXForwardedProto" setting in  appsettings.json !

Thanks for pointing this out.  I will try this out on a vanilla build on Linux, but I'm sure this will do the job.

Thanks
Jon
Il y a 3 ans
It would be a good idea having an option to restrict products to particular shipping methods. We have, for example, fragile products which can't be posted.
Il y a 3 ans
Hello again Sergei-k,

I can confirm the following combinations of settings resolved my redirect problems over SSL with Linux/Nginx. Many thanks for your guidance.

Jon

"Hosting": {


   //Set to "true" the settings below if your hosting uses a load balancer. It'll be used to determine whether the current request is HTTPS
    "UseHttpClusterHttps": false,
    "UseHttpXForwardedProto": true,

  
    "ForwardedHttpHeader": "X-FORWARDED-PROTO"





JonQuick wrote:
Hi, JonQuick.
Did you try to enable the UseHttpXForwardedProto setting in the appsettings.json, is it not helping work with HTTPS on Linux?

On the face of it, It appears we need this at the beginning of Startup.Configure, in order for SSL to work behind Nginx on Linux. Otherwise I experience '301 moved permanently errors' and 'too many redirects' when SSL is enabled on the store.

As per the MS documentation for hosting NET CORE 3.1 on Linux with Nginx

https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-3.1

Because requests are forwarded by reverse proxy, use the Forwarded Headers Middleware from the Microsoft.AspNetCore.HttpOverrides package. The middleware updates the Request.Scheme, using the X-Forwarded-Proto header, so that redirect URIs and other security policies work correctly.


 using Microsoft.AspNetCore.HttpOverrides;

app.UseForwardedHeaders(new ForwardedHeadersOptions
{
    ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});




Hi Sergei-k,

I had overlooked this "UseHttpXForwardedProto" setting in  appsettings.json !

Thanks for pointing this out.  I will try this out on a vanilla build on Linux, but I'm sure this will do the job.

Thanks
Jon
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.