Convert public directory from submodule to normal directory
- Remove public from git submodule tracking - Add all public directory contents as regular files - Fixes GitHub Actions error: "No url found for submodule path 'public' in .gitmodules" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
		
							
								
								
									
										20
									
								
								public/functions/_middleware.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								public/functions/_middleware.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| // Respond to OPTIONS method | ||||
| export const onRequestOptions: PagesFunction = async () => { | ||||
|   return new Response(null, { | ||||
|     status: 204, | ||||
|     headers: { | ||||
|       'Access-Control-Allow-Origin': '*', | ||||
|       'Access-Control-Allow-Headers': '*', | ||||
|       'Access-Control-Allow-Methods': 'GET, OPTIONS', | ||||
|       'Access-Control-Max-Age': '86400', | ||||
|     }, | ||||
|   }); | ||||
| }; | ||||
|  | ||||
| // Set CORS to all /api responses | ||||
| export const onRequest: PagesFunction = async ({ next }) => { | ||||
|   const response = await next(); | ||||
|   response.headers.set('Access-Control-Allow-Origin', '*'); | ||||
|   response.headers.set('Access-Control-Max-Age', '86400'); | ||||
|   return response; | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user