Skip to content

Conversation

@VargaJoe
Copy link
Contributor

This branch introduces a targeted fix for cross-origin requests to the binaryhandler.ashx endpoint in SenseNet. It ensures that CORS headers are manually injected in the BinaryMiddleware for GET requests, allowing React and other frontends to fetch images and files from the backend without CORS errors.

Key changes:

  • Manually injects CORS headers in BinaryMiddleware for binaryhandler.ashx requests, supporting dynamic allowed origins and credentials.
  • Adds detailed logging for request paths, methods, CORS policy evaluation, and header injection, aiding debugging and cross-project testing.
  • Retains verbose logs to help diagnose CORS and browser cache issues (pending company decision to remove or reduce logging).

This fix resolves issues where browser cache or pipeline branching prevented proper CORS header delivery, and enables successful cross-origin file access from modern frontends.

…eware for cross-origin requests

- Ensures CORS headers are injected for binaryhandler.ashx requests
- Adds detailed request and CORS policy logging for easier debugging
- Retains logs for cross-project testing (pending user decision to remove)

Refs: React frontend CORS issues, browser cache troubleshooting, SnCorsPolicyProvider integration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants