CDLUC3 / dmptool

DMPTool version of the DMPRoadmap codebase
https://dmptool.org
MIT License
58 stars 13 forks source link

Updated DMP Regex logic to account for different environments #568

Closed jupiter007 closed 5 months ago

jupiter007 commented 5 months ago

Fixes #566

Changes proposed in this PR: We currently extract the "DMP ID" from the dmp.landingPageUrl property, and we use a RegEx to do it. However, the RegEx we were using didn't work for users on Production because there is no "/dmps/" in the path.

So I made a small change to check for the hostname and the NODE environment, and set a different RegEx for production.