Debug and fix Cross-Origin Resource Sharing (CORS) errors
Help me fix CORS errors in my web application.
**Browser error message:**
```
{{ERROR_MESSAGE}}
```
**Frontend request code:**
```{{FRONTEND_LANGUAGE}}
{{FRONTEND_CODE}}
```
**Backend CORS configuration:**
```{{BACKEND_LANGUAGE}}
{{BACKEND_CODE}}
```
**Request details:**
- Origin: {{ORIGIN}}
- Target URL: {{TARGET_URL}}
- HTTP Method: {{METHOD}}
- Custom Headers: {{HEADERS}}
**Backend framework:** {{BACKEND_FRAMEWORK}}
Please provide:
1. **Error Explanation**: What this specific CORS error means
2. **Preflight Analysis**: Check OPTIONS preflight handling
3. **Header Analysis**: Verify required CORS headers
4. **Configuration Fix**: Correct CORS configuration for backend
5. **Frontend Adjustments**: Any needed frontend changes
6. **Credential Handling**: Proper setup for credentials if needed
7. **Security Considerations**: Secure CORS configuration
8. **Testing Steps**: How to verify CORS is workingOr press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{ERROR_MESSAGE][{FRONTEND_LANGUAGE][{FRONTEND_CODE][{BACKEND_LANGUAGE][{BACKEND_CODE][{ORIGIN][{TARGET_URL][{METHOD][{HEADERS][{BACKEND_FRAMEWORK]