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.
3 года назад
ibridge.support wrote:
Small Issue with Customer Tier Pricing Roles


Thanks for your investigation. We accidentally broke role filtering. Fixed now.
3 года назад
When will the official version be released
3 года назад
We plan to release 4.30 RTM this Friday (May 15th) and Monday (May 18th)
3 года назад
thanks  RomanovM ,   thats excellent news
3 года назад
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
});
3 года назад
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
});
3 года назад
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
});
3 года назад
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
3 года назад
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.
3 года назад
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.