Closed alex8bitw closed 3 months ago
With allowDynamicBackends(false)
all calls to fetch
must have a backend
property provided. If you are finding this is not the case, can you share a code example of how you are able to achieve this?
Here's a Fiddle: https://fiddle.fastly.dev/fiddle/a1152147 Note that the Fiddle works as it's supposed to. No backend is setup when allowDynamicBackends(false); But I find that when I actually upload the Compute code, this value is ignored.
Let me know if you're able to replicate.
@alex8bitw when you say "ignored" do you mean that the application you've provided in the fiddle works correctly on compute instead of failing?
I went over the code, and I believe I see the issue. I was setting allowDynamicBackends(false) in a global scope, but I was also setting the following in a local scope:
allowDynamicBackends({ connectTimeout: global_connectTimeout, firstByteTimeout: global_firstByteTimeout, betweenBytesTimeout: global_betweenBytesTimeout, });
The dynamic timeout config overrides the allowDynamicBackends(false), this seems to be by design.
That is correct, the default behaviour is for dynamic backends to be disabled. When calling allowDynamicBackends
with a value other than false
, they are enabled.
Using v3.15.0 of js-compute on Fastly, with Dynamic Backend support enabled:
It seems allowDynamicBackends(false); or allowDynamicBackends(true); do nothing.