NCIOCPL / cgov-digital-platform-dynamic-services

Legacy CDE Services
1 stars 2 forks source link

Update link for trial details #37

Closed blairlearn closed 9 months ago

blairlearn commented 11 months ago

Issue description

Clinical trial search has been updated to use new URLs under '/research/participate/clinical-trials-search/. The clinical trial redirector still sends traffic to the old/about-cancer/treatment/clinical-trials/search` url structure and the user is redirected a second time by Akamai.

It would be better to go to the new URL structure directly.

ESTIMATE TBD

What's the expected change?

What's the current functionality?

What's the updated acceptance criteria?

Scenario Trial in clinical trials API.
Given path 'clinicaltrials', 'NCT04916002'
When method get
Then status 302
And match header Location == '/research/participate/clinical-trials-search/v?id=NCT04916002&r=1'

Scenario Trial NOT found in clinical trials API.
Given path 'clinicaltrials', 'NCT05911152'
When method get
Then status 302
And match header Location == 'https://clinicaltrials.gov/study/NCT05911152'

The redirect should go directly to the target URL without any intermediary redirects.


Because the lower tier environments are behind the NIH firewall, this cannot be tested through a front end web site.

To test in the browser, use the F12 tools and the network tab to check the actual traffic.

Alternatively, use curl with the --verbose option.

$ curl -v  https://cgdp-dyn-svcs-qa.cancer.gov/clinicaltrials/nct04916002
*   Trying 44.215.87.252:443...
* Connected to cgdp-dyn-svcs.cancer-qa.gov (44.215.87.252) port 443 (#0)
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* 
* OMITTED
* 
> GET /clinicaltrials/nct04916002 HTTP/2
> Host: cgdp-dyn-svcs-qa.cancer.gov
> User-Agent: curl/8.1.2
> Accept: */*
> 
< HTTP/2 302 
< date: Thu, 09 Nov 2023 17:35:53 GMT
< content-type: text/html; charset=utf-8
< location: https://www.cancer.gov/research/participate/clinical-trials-search/v?id=NCT04916002&r=1
< cache-control: private
< x-aspnet-version: 4.0.30319
< 
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="https://www.cancer.gov/research/participate/clinical-trials-search/v?id=NCT04916002&r=1">here</a>.</h2>
</body></html>

Additional details / screenshot

Related Tickets