• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • Our UX team believes in the in the power of direct feedback and would like to invite you to participate in interviews, tests, and surveys.
    To stay in the loop and never miss an opportunity to share your thoughts, please subscribe to our UX research program. If you were previously part of the Plesk UX research program, please re-subscribe to continue receiving our invitations.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

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