• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • 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 Node.js - Domain names not resolved correctly when performing local GET requests during build-time

tacriela

New Pleskian
Server operating system version
Debian 9.13.0
Plesk version and microupdate number
18.0.44
Hey everyone,

So I ran into this "interesting" scenario today. First, allow me to explain what it is that I'm trying to accomplish:

I would like to run a Next.JS application in combination with a Strapi backend CMS on my Plesk server. In order to get the best out of Next.JS I need to perform an API request during build-time, such that it can statically render the pages specified in the CMS. I had previously set it up without this static rendering, which worked perfectly fine, however I have changed this to fetch the data build-time since today. Locally, my Next.JS project works completely fine (even when connecting it to the remote CMS), however, as soon as I try to build the Next.JS app on Plesk, it for some reason redirects all of my "local" GET requests to my server's router (so any GET request to a URL that is hosted on my Plesk, even if it is a different website. Whenever it is not local, such as google.com, it loads the page perfectly fine), and I end up with a PfSense error stating that I'm performing a potential DNS rebind attack. When I disable this rule, I just end up on the login page of my router, so my router blocking certain requests does not seem to be the issue.

Does anyone perhaps know what is happening here? I have also tried different GET methods, such as http and Axios, but unfortunately they all have the same result. My log can be found below:

EDIT
This not only happens during build-time, but also when I'm using Next.js' getServerSideProps, which uses server-side rendering to fetch the data. Basically what's going wrong is any data I'm trying to fetch from a local domain on the server side ends up on my router's page.
 
Back
Top