• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Nginx allow referer

trensco

New Pleskian
Hello,

an external Website (iframe on my website) triggers with button click a certain URL in my CMS like "dev.my domain.com/index.php?id=123". Its a GET request. The problem is that I got an nginx error 500. If I run this URL "dev.my domain.com/index.php?id=123" straight on my server without a referer (without using that iframe button) its working (code 200).

So I'm assuming that nginx got some problem with the referer and dont let it trough.

This is the header request:

Code:
:authority: dev.mydomain.com
:method: GET
:path: /index.php?id=123
:scheme: https
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
accept-encoding: gzip, deflate, br
accept-language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
authorization: Basic ZGV2OjEyMzQ1Ng==
referer: https://paketshop.myhermes.de/
sec-ch-ua: "Google Chrome";v="89", "Chromium";v="89", ";Not A Brand";v="99"
sec-ch-ua-mobile: ?0
sec-fetch-dest: iframe
sec-fetch-mode: navigate
sec-fetch-site: cross-site
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36

So what is the best way to allow nginx to access this url/file from a different referer?

I tried things like:

Code:
add_header 'Access-Control-Allow-Origin' 'https://myhermes.de';

Code:
valid_referers none blocked server_names *.myhermes.de/;
if ($invalid_referer) {
    return 403;
}

Would be nice if somebody can help :)

nginx/1.16.1
 
Just foud out this only happens in Chromium browsers like chrome, opera ... Seems like this is a browser issue ?! I Need to investigate.
 
Last edited:
Are you sure it is nginx that has a problem?
Might also be that the backend has a problem with some headers/cookies, and then nginx returns 500 for backend fetch failure.
 
You are right. It was a cookie problem. All Chromium based browsers require the SameSite attribute for cross-site cookies.

SameSite:None
 
Back
Top