• 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 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