• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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