diff --git a/index.html b/index.html
index 604abe8..a3a2f74 100644
--- a/index.html
+++ b/index.html
@@ -757,19 +757,6 @@ async function safeFetch(url, options = {}) {
console.error('Error fetching proposals:', error);
showErrorMessage('Failed to load petitions. Please check the console for details.', true);
}
-
- // Hide loading indicator
-function hideLoadingIndicator() {
- const proposalsContainer = document.getElementById('proposals-container');
- if (proposalsContainer) {
- // Only remove if it exists
- const loadingIndicator = proposalsContainer.querySelector('.loading-indicator');
- if (loadingIndicator) {
- loadingIndicator.remove();
- }
- }
-}
-
}
// Function to render all proposals
diff --git a/worker.js b/worker.js
index 4a4d1a5..e7c80da 100644
--- a/worker.js
+++ b/worker.js
@@ -2,11 +2,7 @@
const corsHeaders = {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
-<<<<<<< Updated upstream
'Access-Control-Allow-Headers': 'Content-Type, Authorization, Accept',
-=======
- 'Access-Control-Allow-Headers': 'Content-Type, Authorization, Accept, Cache-Control, X-Requested-With',
->>>>>>> Stashed changes
'Access-Control-Max-Age': '86400'
};
@@ -15,21 +11,10 @@ const DEFAULT_PAGE_SIZE = 20;
const MAX_PAGE_SIZE = 100;
// Handle OPTIONS request for CORS preflight
-function handleOptions(request) {
- if (
- request.headers.get('Origin') !== null &&
- request.headers.get('Access-Control-Request-Method') !== null &&
- request.headers.get('Access-Control-Request-Headers') !== null
- ) {
- return new Response(null, {
- headers: corsHeaders,
- status: 204
- });
- } else {
- return new Response(null, {
- headers: corsHeaders
- });
- }
+function handleOptions() {
+ return new Response(null, {
+ headers: corsHeaders
+ });
}
// Helper to create standardized responses