How can the backstage tell if the request comes from WeChat Mini Programs?

how can the backend tell if the request comes from WeChat Mini Programs?

Apr.03,2021

when Mini Program makes a request, encapsulating api.js adds additional parameters to the request address. There are no secrets such as URL?reFrom= "wx"


HTTP request itself.
if you want to restrict access, what you need to do is to agree on an encryption or signature method with the client. This algorithm is implemented in WeChat Mini Programs (Mini Program's decompilation is still a little difficult, but only some)
so that the server fails to verify the signature. This access is denied. If the PC side is not encrypted, it cannot be accessed.

Menu