Prerender: Clinical Trial Search Request Forwarding - NCIOCPL/cgov-digital-platform GitHub Wiki

Standard Users

In order to minimize the number of dynamic requests to Drupal, Akamai forwarding rules are created to send all requests for clinical trial search pages to the same path on the origin server.

With the following exceptions, all paths under (and including) application's base URL are considered valid.

The exceptions are:

  • /research/participate/clinical-trials-search/help
  • /research/participate/clinical-trials-search/help/*
  • /research/participate/clinical-trials-search/steps
  • /research/participate/clinical-trials-search/steps/*

Prerendering

When clinical trial search pages are requested by a user identified as Googlebot or Bingbot (or other presently unspecified crawler), the Akamai forwarding rules are nearly identical to those for standard users.

The single difference from standard users is the clinical trials details page (/research/participate/clinical-trials-search/v). Requests to this path are forwarded to the Prerender service.

flowchart LR
    start((Request))
    requestPath{/clinical trials search?}
    start-->requestPath

    helpAndSearch{Request for help/* or steps/*?}

    normalRequest[ Drupal Content ]
    requestPath-->helpAndSearch

    subgraph ctsPaths [ Clinical Trial Search App ]

        isTrialDetails{ Is this the details page? <br> clinical-trials-search/v }

        isPrerender{ Is user a prerender bot? }
        rewrite[ Rewrite path to /research/participate/clinical-trials-search ]
        rewrite2[ Rewrite path to /research/participate/clinical-trials-search ]
        doPrerender[ Forward to Prerender ]

        isTrialDetails-- Yes -->isPrerender
        isTrialDetails-- No -->rewrite
        isPrerender-- Yes -->doPrerender
        isPrerender-- No -->rewrite2

    end

    helpAndSearch-- Yes -->normalRequest
    helpAndSearch-- No -->isTrialDetails