- Added package.json with dependencies and scripts for building and testing the API. - Implemented DIContainer for managing service instances (Cosmos DB, Key Vault). - Created createDonation function to handle donation creation and Stripe payment processing. - Implemented getDonations function for fetching donations with pagination and filtering. - Defined types for Donation, Volunteer, Program, and API responses. - Configured TypeScript with tsconfig.json for strict type checking and output settings. - Developed deployment scripts for production and simple deployments to Azure. - Created Bicep templates for infrastructure setup including Cosmos DB, Key Vault, and Function App. - Added parameters for deployment configuration in main.parameters.json. - Configured static web app settings in staticwebapp.config.json for routing and security.
33 lines
909 B
JSON
33 lines
909 B
JSON
{
|
|
"routes": [
|
|
{
|
|
"route": "/api/*",
|
|
"allowedRoles": ["anonymous"]
|
|
},
|
|
{
|
|
"route": "/admin/*",
|
|
"allowedRoles": ["admin"]
|
|
},
|
|
{
|
|
"route": "/*",
|
|
"serve": "/index.html",
|
|
"statusCode": 200
|
|
}
|
|
],
|
|
"responseOverrides": {
|
|
"401": {
|
|
"redirect": "/login",
|
|
"statusCode": 302
|
|
}
|
|
},
|
|
"globalHeaders": {
|
|
"X-Content-Type-Options": "nosniff",
|
|
"X-Frame-Options": "DENY",
|
|
"Content-Security-Policy": "default-src 'self' https:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https:; style-src 'self' 'unsafe-inline' https:; img-src 'self' data: https:; font-src 'self' https:; connect-src 'self' https:; media-src 'self' https:; object-src 'none'; base-uri 'self'; form-action 'self' https:; frame-ancestors 'none'"
|
|
},
|
|
"mimeTypes": {
|
|
".json": "application/json",
|
|
".js": "text/javascript",
|
|
".css": "text/css"
|
|
}
|
|
} |