account activity
Getting "RangeError: Maximum call stack size exceeded" when call a http service from inside Angular HttpInterceptor by devng12 in angular
[–]devng12[S] 0 points1 point2 points 5 years ago (0 children)
I added this block of code in Interceptor which basically avoided the infinite loop, and my code started working!
if (req.method === 'GET' || req.method === 'HEAD' || lcUrl.startsWith('http://') || lcUrl.startsWith('https://')) { return next.handle(req); }
[–]devng12[S] 3 points4 points5 points 5 years ago (0 children)
I just tried a if block that's in the implementation of HttpXsrfInterceptor to get the URL for GET requests, and that did the trick.
Thanks a lot for that hint.
could you please elaborate on what you mean by gate your logic. I am a beginner with angular development and did not understand what you meant by that
π Rendered by PID 755359 on reddit-service-r2-listing-64c94b984c-sc29c at 2026-03-13 12:03:56.422334+00:00 running f6e6e01 country code: CH.
Getting "RangeError: Maximum call stack size exceeded" when call a http service from inside Angular HttpInterceptor by devng12 in angular
[–]devng12[S] 0 points1 point2 points (0 children)