The invention relates to a cross-platform non-intrusive front-end
data request security
encryption method, which belongs to the technical field of front-end security communication, and comprises the following steps of: detecting a terminal environment of a
client by a security component to distinguish the terminal environment, judging whether the current terminal environment is a browser environment or a WeChat applet environment, and if yes, sending the current terminal environment to a
server; detection
adaptation of a terminal environment is realized; setting a request interceptor of a corresponding type according to the detected terminal environment and
data request mode; and the security component calls the request interceptor, carries out underlying API interception proxy on the front-end
data request and the
server response data, and executes security
encryption and decryption and anti-replay
processing. According to the method, the development and
test efficiency can be improved, the risk of influencing the normal
business process is reduced, the front-end request security protection coverage range is increased, and the security blind area is reduced.