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.
π£ 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