Make Uplink Functions Unavailable To Client

Is there any way to create functions in uplink code without wrapping them in

@anvil.server.callable

making them essentially invisible to the client but still usable by server side code?

I might be being oversensitive here, but this particular function is dangerous and I don’t want any possibility for a client to be manipulated to be able to call it. Just makes me nervous…

Am I being unnecessarily paranoid?

1 Like

I’ve just used a secret as a function parameter when I’ve need to do this. Wrong/missing secret in the arguments raises an exception.

2 Likes

Interesting - nice idea, thanks.

1 Like

Moving to Feature Requests. It would definitely be an improvement if we made it possible to specify that an anvil.server.callable function was available only to the server code. We’ll add it to our prioritisation process.

@owen.campbell’s approach sounds like a good way of achieving the intended effect in the meantime (thanks Owen).

1 Like

Is there any update on this feature request? I also need to avoid clients from accessing an uplink function which handles highly sensitive data.