Nginx Support required

Saint Michael venefax at gmail.com
Sun Sep 3 12:05:37 UTC 2023


I added support for CORS as instructed but it keeps failing.
The question is: if this is a full reverse proxy, and all requests come
from my NGINX server, why Dailymotion sees something different than a
regular user trying to connect to a video?
Is there something else that I am missing in the code so 100% of requests
that hit Dailymotion seem to come from the NGNX machine?
These is my code
proxy_buffering on;
resolver 127.0.0.1 ipv6=off;
proxy_http_version 1.1;
proxy_buffer_size  128k;
proxy_busy_buffers_size  256k;
proxy_buffers 4 256k;
proxy_pass_header *;
proxy_set_header Connection "Keep-Alive";
proxy_set_header Proxy-Connection "Keep-Alive";
proxy_set_header X-Frame-Options sameorigin;
proxy_set_header X-Content-Type-Options nosniff;
proxy_set_header X-Xss-Protection "1; mode=block";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto   $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header Accept-Encoding "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_ssl_server_name on;
proxy_ssl_name $proxy_host;

proxy_cookie_domain https://ntn24.com https://ntn24.1eye.us;
proxy_set_header Host "www.ntn24.com";
proxy_pass https://www.ntn24.com;
proxy_redirect https://www.ntn24.com https://ntn24.1eye.us;

subs_filter_types text/css text/javascript application/javascript;
subs_filter "ntn24.com" "ntn24.1eye.us" gi;
subs_filter "https://(.*).ntn24.com/(.*)" "https://ntn24.1eye.us/$1/$2" gi;
subs_filter "https://ntn24.com" "https://ntn24.1eye.us" gi;
subs_filter "https://www.ntn24.com" "https://ntn24.1eye.us" gi;
subs_filter "www.ntn24.com" "ntn24.1eye.us" gi;





On Sun, Sep 3, 2023 at 7:06 AM Aleksandar Lazic <al-nginx at none.at> wrote:

> Hi Michael.
>
> On 2023-09-02 (Sa.) 23:13, Saint Michael wrote:
> > Does anybody have any idea what am I doing wrong?
>
> You don't follow the suggestions from the response of the community member.
>
> The original Question was a Upload problem, which moves now to a
> Download/Video play problem. What's now the Issue?
>
> As Maxim Konovalov also have told you that this list have no SLA's.
>
>  > @nginx at nginx.org: Please help on this as we need immediate support on
> this however my ID registerd on Nginx subscription.
>
> nginx at nginx.org is the Mailing list of the nginx-oss part therefore
> isn't any ID necessary. If you want paid support please follow the link
> below and request a nginx plus license.
>
> Maybe it's not a nginx error but more a CORS error for that URL
> https://mv.larepublica.co/trends/ntn . Have you tried to run the network
> debugging on chrome or Firefox to see what requests are done and what
> the response is?
>
>
> ```
> (anonymous) @
> https://ntn24.1eye.us/__assets/assets/v1.0.0.30/ntn-modals.d257a509.js:15
> xhr @
> https://ntn24.1eye.us/__assets/assets/v1.0.0.30/ntn-modals.d257a509.js:15
> Wc @
> https://ntn24.1eye.us/__assets/assets/v1.0.0.30/ntn-modals.d257a509.js:15
> request @
> https://ntn24.1eye.us/__assets/assets/v1.0.0.30/ntn-modals.d257a509.js:15
> (anonymous) @
> https://ntn24.1eye.us/__assets/assets/v1.0.0.30/ntn-modals.d257a509.js:15
> (anonymous) @
> https://ntn24.1eye.us/__assets/assets/v1.0.0.30/ntn-modals.d257a509.js:13
> s @ https://ntn24.1eye.us/__assets/assets/v1.0.0.30/trends.480abc11.js:1
> i @ https://ntn24.1eye.us/__assets/assets/v1.0.0.30/trends.480abc11.js:1
> (anonymous) @
>
> https://ntn24.1eye.us/__assets/assets/v1.0.0.30/desktop-post-video.b2e548a9.js:1
>
>  > https://mv.larepublica.co/trends/ntn
> ```
>
> As you can see are the URL's on different Domains, which can cause a
> CORS problem.
>
> https://www.ntn24.com/noticias-actualidad/...
> https://ntn24.1eye.us/noticias-actualidad/...
>
> Here some suggstions for the internet search.
>
> https://html.duckduckgo.com/html?q=nginx%20cors
> https://enable-cors.org/server_nginx.html
>
> Here a explanation what CORS is
>
> https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#Cross-origin_network_access
> https://en.wikipedia.org/wiki/Cross-origin_resource_sharing
>
>
> Regards
> Alex
>
> > On Sat, Sep 2, 2023 at 4:42 PM Aleksandar Lazic <al-nginx at none.at
> > <mailto:al-nginx at none.at>> wrote:
> >
> >     Hi Michael.
> >
> >     On 2023-09-02 (Sa.) 19:01, Saint Michael wrote:
> >      > Is there any paid support that would help me fix this problem:
> >
> >     You searched for this site
> >     https://www.nginx.com/products/nginx/compare-models/
> >
> >     nginx offers via nginx plus a product with support and more as you
> can
> >     see in the page above.
> >
> >     As we used nginx plus, before it was part of F5, can I say that the
> >     support was quite good. I assume that's still the case.
> >
> >     As Francis Daly have written is this the Mailing list of the open
> >     source
> >     nginx.
> >
> >     @nginx team. the ml archives does not look in a good state a the
> >     messages are from Sept 2023 the last one in the archive.
> >     https://nginx.org/en/support.html
> >
> >     https://mailman.nginx.org/pipermail/nginx/
> >     https://marc.info/?l=nginx <https://marc.info/?l=nginx>
> >
> >     gmane does not resolve
> >     http://dir.gmane.org/gmane.comp.web.nginx.english
> >
> >     Regards
> >     Alex
> >
> >      > This works:
> >      >
> >
> https://www.ntn24.com/noticias-actualidad/crecen-las-hipotesis-alrededor-de-la-muerte-del-exjefe-del-grupo-wagner-yevgueni-prigozhin-439911
> <
> https://www.ntn24.com/noticias-actualidad/crecen-las-hipotesis-alrededor-de-la-muerte-del-exjefe-del-grupo-wagner-yevgueni-prigozhin-439911
> >
> >      > but in the link below, the video from videomotion, fails to play:
> >      >
> >
> https://ntn24.1eye.us/noticias-actualidad/crecen-las-hipotesis-alrededor-de-la-muerte-del-exjefe-del-grupo-wagner-yevgueni-prigozhin-439911
> <
> https://ntn24.1eye.us/noticias-actualidad/crecen-las-hipotesis-alrededor-de-la-muerte-del-exjefe-del-grupo-wagner-yevgueni-prigozhin-439911
> >
> >      >
> >      > The proxy should work, this is my definition
> >      >
> >      >   server {
> >      >          default_type  application/octet-stream;
> >      >          set $template_root
> >     /usr/local/openresty/nginx/html/templates;
> >      >          listen 38.95.11.236:443 <http://38.95.11.236:443> ssl;
> >      >          error_log logs/error.log warn;
> >      >          access_log logs/access.log;
> >      >          server_name ntn24.1eye.us <http://ntn24.1eye.us>
> >     <http://ntn24.1eye.us <http://ntn24.1eye.us>>;
> >      >          ssl_certificate
> >      > /etc/letsencrypt/live/ntn24.1eye.us/fullchain.pem
> >     <http://ntn24.1eye.us/fullchain.pem>
> >      > <http://ntn24.1eye.us/fullchain.pem
> >     <http://ntn24.1eye.us/fullchain.pem>>;
> >      >          ssl_certificate_key
> >      > /etc/letsencrypt/live/ntn24.1eye.us/privkey.pem
> >     <http://ntn24.1eye.us/privkey.pem>
> >      > <http://ntn24.1eye.us/privkey.pem
> >     <http://ntn24.1eye.us/privkey.pem>>;
> >      >          include /etc/letsencrypt/options-ssl-nginx.conf; #
> >     managed by
> >      > Certbot
> >      >          ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed
> >     by Certbot
> >      >
> >      >          location / {
> >      > include /etc/proxy_include.txt;
> >      > proxy_cookie_domain https://ntn24.com <https://ntn24.com>
> >     <https://ntn24.com <https://ntn24.com>>
> >      > https://ntn24.1eye.us <https://ntn24.1eye.us>
> >     <https://ntn24.1eye.us <https://ntn24.1eye.us>>;
> >      > proxy_set_header Host "www.ntn24.com <http://www.ntn24.com>
> >     <http://www.ntn24.com <http://www.ntn24.com>>";
> >      > proxy_pass https://www.ntn24.com <https://www.ntn24.com>
> >     <https://www.ntn24.com <https://www.ntn24.com>>;
> >      > proxy_redirect https://www.ntn24.com <https://www.ntn24.com>
> >     <https://www.ntn24.com <https://www.ntn24.com>>
> >      > https://ntn24.1eye.us <https://ntn24.1eye.us>
> >     <https://ntn24.1eye.us <https://ntn24.1eye.us>>;
> >      >
> >      > subs_filter_types text/css text/javascript application/javascript;
> >      > subs_filter "ntn24.com <http://ntn24.com>" "ntn24.1eye.us
> >     <http://ntn24.1eye.us>" gi;
> >      > subs_filter "https://(.*).ntn24.com/(.*) <http://ntn24.com/(.*)>"
> >     "https://ntn24.1eye.us/$1/$2 <https://ntn24.1eye.us/$1/$2>" gi;
> >      > subs_filter "https://ntn24.com <https://ntn24.com>"
> >     "https://ntn24.1eye.us <https://ntn24.1eye.us>" gi;
> >      > subs_filter "https://www.ntn24.com <https://www.ntn24.com>
> >     <https://www.ntn24.com <https://www.ntn24.com>>"
> >      > "https://ntn24.1eye.us <https://ntn24.1eye.us>
> >     <https://ntn24.1eye.us <https://ntn24.1eye.us>>" gi;
> >      > subs_filter "www.ntn24.com <http://www.ntn24.com>
> >     <http://www.ntn24.com <http://www.ntn24.com>>" "ntn24.1eye.us
> >     <http://ntn24.1eye.us>
> >      > <http://ntn24.1eye.us <http://ntn24.1eye.us>>" gi;
> >      >
> >      >          }
> >      >
> >      >
> >      >      }
> >      >
> >      >
> >      > the proxy_include.txt  file:
> >      > proxy_buffering on;
> >      > resolver 127.0.0.1 ipv6=off;
> >      > proxy_http_version 1.1;
> >      > proxy_buffer_size  128k;
> >      > proxy_busy_buffers_size  256k;
> >      > proxy_buffers 4 256k;
> >      > proxy_pass_header *;
> >      > proxy_set_header Connection "Keep-Alive";
> >      > proxy_set_header Proxy-Connection "Keep-Alive";
> >      > #proxy_set_header User-Agent "Mozilla/5.0 (Windows NT 10.0;
> >     Win64; x64)
> >      > AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82
> >     Safari/537.36";
> >      > #proxy_set_header User-Agent $http_user_agent;
> >      >
> >      > proxy_set_header X-Frame-Options sameorigin; # read here
> >      > proxy_set_header X-Content-Type-Options nosniff; # read here
> >      > proxy_set_header X-Xss-Protection "1; mode=block"; #read here
> >      > proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> >      > proxy_set_header X-Forwarded-Proto   $scheme;
> >      > proxy_set_header Upgrade $http_upgrade;
> >      > proxy_set_header Connection $http_connection;
> >      > proxy_set_header Accept-Encoding "";
> >      > proxy_set_header X-Real-IP $remote_addr;
> >      > proxy_set_header X-Scheme $scheme;
> >      > proxy_ssl_server_name on;
> >      > proxy_ssl_name $proxy_host;
> >      >
> >      >
> >      >
> >      >
> >      >
> >      >
> >      >
> >      >
> >      > _______________________________________________
> >      > nginx mailing list
> >      > nginx at nginx.org <mailto:nginx at nginx.org>
> >      > https://mailman.nginx.org/mailman/listinfo/nginx
> >     <https://mailman.nginx.org/mailman/listinfo/nginx>
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20230903/8722beb7/attachment-0001.htm>


More information about the nginx mailing list