#How to determine if a worker request is from a service binding vs external HTTP?

3 messages · Page 1 of 1 (latest)

frosty spruce
#

If I have a worker that I want to behave differently when invoked via service binding instead of outside http, how can I tell with certainty which method invoked it?

The use case here is to bypass auth and bot filtering measures on service binding calls that we know came from our network.

primal cobalt
#

I don't think there's a native way. You could attach a custom header, as well as I believe you can technically attach arbitrary properties to request.cf too if that's preferred.

frosty spruce
#

Thanks for the ideas James! 🙇‍♂️