Language: TypeScript
Label: vulnerable
CWE: CWE-918 \u2014 Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.

Code:
  const renderPage = async (reply: FastifyReply): Promise<void> => {
    return reply.view("index.html", {
      PUBLIC_APP_URL: fastify.config.PUBLIC_APP_URL,
      PUBLIC_API_URL: fastify.config.PUBLIC_API_URL,
      PUBLIC_COLLAB_URL: fastify.config.PUBLIC_COLLAB_URL,
      PUBLIC_ASSETS_URL: fastify.config.PUBLIC_ASSETS_URL,
      PUBLIC_DISABLE_ANALYTICS: fastify.config.PUBLIC_DISABLE_ANALYTICS,
      PUBLIC_APP_TYPE: fastify.config.PUBLIC_APP_TYPE
    });
  };