cisagov / crossfeed

External monitoring for organization assets
https://docs.crossfeed.cyber.dhs.gov
Creative Commons Zero v1.0 Universal
364 stars 54 forks source link

Revert Create Project Level Constants and Implement frontend/scripts Constants File #2492

Closed Matthew-Grayson closed 7 months ago

Matthew-Grayson commented 7 months ago

πŸ—£ Description

Remove project level ./constants.ts. Add frontend/scripts/constants.ts to maintain code deduplication across api.js and docs.js. Revert cors options found in backend/src/app.ts to use hard-coded values.

πŸ’­ Motivation and context

In PR #2484, I implemented a project-level constants file for storing cors options to reduce duplication of code. This causes issues with deployment and tests. More specifically, the backend configuration doesn't allow importing files/constants from outside the backend directory.

πŸ§ͺ Testing

Backend Pipeline runs successfully as seen here.

βœ… Pre-approval checklist

βœ… Pre-merge checklist

βœ… Post-merge checklist