I am currently exploring how to effectively utilize Angular and Breeze together within the HotTowel template. Our internal web application communicates with an internal web service located on a different host, resulting in cross-domain complications (CORS). In a previous project, I successfully resolved this issue by implementing a straightforward server-side proxy to redirect the requests. However, to achieve this, it is necessary to append the proxy URL to all outbound data requests. For example, if Breeze is seeking
http://example-service-host.example/odata/Entity
, I intend to change it to http://example-site.example/proxy.ashx?url=<encodedURL>
.
My challenge lies in figuring out the best approach for accomplishing this task. The HotTowel framework substitutes Breeze ajax service with Angular's $http
. This implies that I should be able to integrate an $http wrapper or adjust where Angular fetches $http from in order to embed the wrapper more deeply.
After reviewing the documentation for both technologies, it appears that a loosely implemented wrapper may encounter challenges since it cannot perfectly mimic the original functionality. I would greatly appreciate any advice on how to proceed with this implementation or recommendations on optimal injection points for the wrapper. Moreover, I am open to other suggestions on whether there is a simpler solution to managing the server-side proxy setup.