Method and device for distinguishing intranet and extranet requests and storage medium
By setting different header information for internal and external network requests in the proxy server and distinguishing the request source according to their values, the problem of the distinction identification of internal and external networks in the prior art is easily tampered with and low distinction, and higher security and service reusability are achieved.
Patent Information
- Application Number
- CN202411939562.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-26
AI Technical Summary
The prior art has problems in the separation of internal and external networks, which are prone to tampering with the label and have a rough distinction, resulting in low security incidents and reusability.
After receiving the user request by the proxy server, the first information is set to the requested header information, and the request source is distinguished according to its value, and the corresponding operation is performed. Specifically, when the request comes from the intranet, it is set to private header information, and when the request comes from the Internet, it is set to public header information.
It effectively avoids the tampering of the distinction identifiers of the internal and external networks, improves the distinction degree, and improves the reusability of the service by distinguishing the source of requests with different business logic.
Smart Images

Figure CN119788377A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device and storage medium for distinguishing between internal and external network requests. Background Art
[0002] With the improvement of security requirements, the necessity of isolating the internal and external networks is becoming more and more important. In systems that support both internal office networks and the Internet, it is necessary to set certain roles or business functions to be accessible only to the internal network. For example, platform administrators are only allowed to access the internal network and not the Internet, or some business functions are not allowed to access the Internet.
[0003] The existing technology has the following problems in distinguishing and isolating internal and external networks: first, the existing technology distinguishes between internal and external networks by sending identifiers through channels, which can be easily tampered with and cause security incidents; second, the existing technology distinguishes between internal and external networks at a coarse level, and a function required by both the internal and external networks requires the development of one set of services for the internal network and another set of services for the Internet, which has low reusability. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, device and storage medium for distinguishing between internal and external network requests, so as to prevent the internal and external network distinguishing identifiers from being tampered with and to improve the reusability of services.
[0005] In order to achieve the above-mentioned purpose, the first aspect of the present application provides a method for distinguishing between internal and external network requests, the method comprising: receiving a user's request, the request including header information; setting first information for the header information, including the name of the first information and the value of the first information; obtaining the value of the first information based on the name of the first information, and distinguishing the source of the request based on the value of the first information; and performing corresponding operations according to the source of the request, wherein the source of the request includes an intranet or the Internet, when the request comes from the intranet, the request is received by the intranet proxy server, and the value of the first information is set to the first header information, when the request comes from the Internet, the request is received by the Internet proxy server, and the value of the first information is set to the second header information.
[0006] In this embodiment of the present application, the first header information is private, and the second header information is public.
[0007] In an embodiment of the present application, the source of the request is distinguished based on the value of the first information, and corresponding operations are performed according to the source of the request, including: when the value of the first information is the first header information, the request is judged to be from the intranet, and the business function corresponding to the request is processed normally; and when the value of the first information is the second header information, the request is judged to be from the Internet, and the processing of the business function corresponding to the request is prohibited.
[0008] In an embodiment of the present application, the method further includes: before setting the first information for the header information, determining whether the request carries the first information; if the request carries the first information, resetting the value of the first information to overwrite the original value.
[0009] In the embodiment of the present application, the method further includes: determining whether the request comes from a designated account, and if not, prohibiting processing of the business function corresponding to the request.
[0010] In an embodiment of the present application, the method further includes: monitoring the source of the request, and when the number of Internet requests from the same source reaches a preset number within a preset time period, issuing an alarm and intercepting the request from the source.
[0011] In the embodiment of the present application, the intranet proxy server is the intranet Nginx, and the Internet proxy server is the Internet Nginx.
[0012] In this embodiment of the present application, the name of the first information is from-c.
[0013] A second aspect of the present application provides a device for distinguishing between internal and external network requests, the device comprising: a proxy server, for receiving a user's request, the request comprising header information, and setting first information for the header information, including a name of the first information and a value of the first information; and an application server, for obtaining the value of the first information based on the name of the first information, and distinguishing the source of the request based on the value of the first information and performing corresponding operations according to the source of the request, wherein the source of the request comprises an intranet or the Internet, the proxy server comprises an intranet proxy server and an Internet proxy server, when the request comes from the intranet, the request is received by the intranet proxy server, and the value of the first information is set to the first header information, and when the request comes from the Internet, the request is received by the Internet proxy server, and the value of the first information is set to the second header information.
[0014] In the embodiment of the present application, the proxy server is further used to determine whether the request carries the first information. If the request carries the first information, the value of the first information is reset to overwrite the original value.
[0015] In the embodiment of the present application, the application server is further configured to determine whether the request comes from a designated account, and if not, prohibit processing of the business function corresponding to the request.
[0016] A third aspect of the present application provides a processor configured to execute the above-mentioned method of distinguishing between internal and external network requests.
[0017] A fourth aspect of the present application provides a machine-readable storage medium having instructions stored thereon, which, when executed by a processor, configures the processor to execute the above-mentioned method for distinguishing between internal and external network requests.
[0018] A fifth aspect of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method for distinguishing between internal and external network requests as described above.
[0019] Through the above technical solution, after the intranet proxy server or the Internet proxy server receives the user request, the first information is set for the header information of the request, and different values of the first information are set for requests from different sources to distinguish the source of the request, instead of using external identification information to distinguish the source. Since the proxy server is located at the application layer, the header information set at this layer can prevent the identification from being maliciously tampered with by the outside. In addition, when the request source can be distinguished, different business logic branches can be entered based on different request sources to implement business functions when executing the service, without having to develop a set of services for the intranet and the Internet respectively, thereby improving the reusability of the service.
[0020] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:
[0022] Figure 1 A schematic diagram of a process flow of a method for distinguishing between internal and external network requests according to an embodiment of the present application is shown;
[0023] Figure 2 A schematic diagram of a process for distinguishing between internal and external network requests for an application service according to an embodiment of the present application is shown;
[0024] Figure 3 A schematic diagram of another processing method for distinguishing between internal and external network requests for application services according to an embodiment of the present application is shown;
[0025] Figure 4 A structural block diagram of a device for distinguishing between internal and external network requests according to an embodiment of the present application is schematically shown;
[0026] Figure 5 The internal structure diagram of a computer device according to an embodiment of the present application is schematically shown.
[0027] Description of Reference Numerals
[0028] 100-Device for distinguishing internal and external network requests;
[0029] 101-Proxy server;
[0030] 102-Application server. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0032] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0033] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0034] The acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. In addition, it should be noted that in the embodiments of this application, some existing solutions in the industry such as certain software, components, and models may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0035] Figure 1 A schematic diagram of a process flow of a method for distinguishing internal and external network requests according to an embodiment of the present application is shown as follows: Figure 1As shown, in one embodiment of the present application, a method for distinguishing between internal and external network requests is provided, and the method includes the following steps S101-S104.
[0036] Step S101: receiving a user's request, wherein the request includes header information.
[0037] Step S102: setting first information for the header information, including the name of the first information and the value of the first information.
[0038] Step S103: acquiring a value of the first information based on the name of the first information, and distinguishing a source of the request based on the value of the first information.
[0039] Step S104: performing corresponding operations according to the source of the request.
[0040] Wherein, the source of the request includes an intranet or the Internet. When the request comes from the intranet, the request is received by the intranet proxy server, and the value of the first information is set as the first header information. When the request comes from the Internet, the request is received by the Internet proxy server, and the value of the first information is set as the second header information. In specific implementation, when a user accesses through the intranet, the access request is sent to the intranet proxy server through the intranet channel, and then the intranet proxy server sets the value of the first information of the request header information of the intranet for the request. Similarly, when a user accesses through the Internet, the access request is sent to the Internet proxy server through the Internet channel, and then the Internet proxy server sets the value of the first information of the request header information of the Internet for the request. The present invention distinguishes between the internal and external networks by setting different values of the first information of the header information for access requests from different sources, instead of using external identification information to distinguish the access source, and the proxy server is located at the application layer, and the header information set at this layer can prevent the identification from being maliciously tampered with by the outside.
[0041] After the request with different header information is received by the corresponding application service, the value of the first information is obtained from the header information of the request, so as to be used for the business logic branch judgment of whether the request comes from the intranet or the Internet. Through the method proposed by the present invention, after the application service judges the source of the service request through the value of the first information, it can enter different business logic branches to implement business functions without having to develop a set of services for the intranet and the Internet respectively, thereby improving the reusability of the application service.
[0042] It should be understood that although Figure 1The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0043] According to a specific implementation manner, the first header information is private, and the second header information is public.
[0044] It should be noted that in other embodiments of the present invention, according to actual conditions, the first information of the intranet request and the first information of the Internet request can also be set to other values, as long as the two are distinguished, and the present invention is not limited to this.
[0045] According to a specific implementation method, the source of the request is distinguished based on the value of the first information, and corresponding operations are performed according to the source of the request, including: when the value of the first information is the first header information, the request is judged to be from the intranet, and the business function corresponding to the request is processed normally; and when the value of the first information is the second header information, the request is judged to be from the Internet, and the processing of the business function corresponding to the request is prohibited.
[0046] In some application services, Internet users are not allowed to access in order to prevent data leakage, network attacks or other potential security risks. For such applications, when the value of the first information of the request is identified as public, the business function corresponding to the request is directly prohibited from processing to protect the system. Figure 2 A schematic diagram of a processing diagram for distinguishing between internal and external network requests for an application service according to an embodiment of the present application is shown schematically. Figure 2As shown, for an application service used for transactions, after an intranet user or Internet user of a front-end channel initiates a request, the intranet proxy server or the Internet proxy server sets the first information, and then the proxy server forwards the request with the first information set to the application service. The forwarding process may involve components such as a gateway. The application service obtains the value of the first information from the request header information, and then determines whether the transaction source is the Internet or the intranet by judging whether the value of the first information is public or private, thereby implementing corresponding business functions, such as allowing intranet users to process business functions normally, prohibiting business function requests from Internet users, or opening different business function permissions to intranet users and Internet users.
[0047] According to a specific implementation, the method further includes: before setting the first information for the header information, determining whether the request carries the first information; if the request carries the first information, resetting the value of the first information to overwrite the original value.
[0048] It is understandable that if an Internet user attempts to disguise himself as an intranet user to access the network, the first information in the header information may be set externally, or in other cases the request from the Internet itself may carry the first information. In the method proposed in the present invention, when the proxy server receives the request, if the original request itself carries the first information, its original value is ignored and the value of the first information is reset according to its source, thereby further preventing external malicious access.
[0049] According to a specific implementation, the method further includes: determining whether the request comes from a designated account, and if not, prohibiting processing of a business function corresponding to the request.
[0050] It should be noted that for some applications, in addition to certain restrictions on the source of the request, there are also requirements for the account that initiates the request. For example, some applications are only open to a small number of people with designated accounts such as administrators. If the request is not from a designated account, access is denied. The present invention enhances the security of application access by double verification of the source of the request and the account of the request. Figure 3 A schematic diagram of another processing method for distinguishing between internal and external network requests of application services according to an embodiment of the present application is shown as follows: Figure 3 As shown, for some applications, only designated accounts are allowed to log in and access the intranet. Therefore, when a user makes a login request, the account and the source of the request are double-verified. Only when both requirements are met is login allowed, otherwise login is prohibited, which improves the security of application data.
[0051] According to a specific implementation, the method further includes: monitoring the source of the request, and when the number of Internet requests from the same source reaches a preset number within a preset time period, issuing an alarm and intercepting the request from the source.
[0052] This setting can prevent malicious users or automated scripts from abusing service resources, ensuring that legitimate users can obtain timely service responses. In addition, the setting of the preset time period and the preset number of times needs to be reasonably configured according to actual business needs and system capacity, and the present invention does not limit this setting.
[0053] According to a specific implementation manner, the intranet proxy server is the intranet Nginx, and the Internet proxy server is the Internet Nginx.
[0054] As a proxy server, Nginx has the advantages of high performance, light weight and flexibility, so Nginx is preferably used as the proxy server in this case. In other embodiments of the present invention, the selection of the proxy server can also be adjusted according to actual conditions, and the present invention is not limited thereto.
[0055] According to a specific implementation manner, the name of the first information is from-c.
[0056] In other embodiments of the present invention, the name of the first information may be set to other names according to actual production conditions, but the present invention is not limited thereto.
[0057] Figure 4 A schematic diagram shows a structural block diagram of a device for distinguishing between internal and external network requests according to an embodiment of the present application. In one embodiment, Figure 4 As shown, the device 100 for distinguishing between internal and external network requests includes: a proxy server 101, used to receive a user's request, the request includes header information, and set first information for the header information, including the name of the first information and the value of the first information; and an application server 102, used to obtain the value of the first information based on the name of the first information, and distinguish the source of the request based on the value of the first information and perform corresponding operations according to the source of the request, wherein the source of the request includes an intranet or the Internet, the proxy server 101 includes an intranet proxy server and an Internet proxy server, when the request comes from the intranet, the request is received by the intranet proxy server, and the value of the first information is set to the first header information, when the request comes from the Internet, the request is received by the Internet proxy server, and the value of the first information is set to the second header information.
[0058] It should be noted that although the application server can receive the header information of the request, if the application server is not configured, the application server will directly ignore the first information or handle it incorrectly. Therefore, before the application server receives the request, the application server needs to be configured to identify the first information of the header information and perform logical judgment based on its value.
[0059] According to a specific implementation, the proxy server 101 is further configured to determine whether the request carries the first information, and if the request carries the first information, reset the value of the first information to overwrite the original value.
[0060] According to a specific implementation, the application server 102 is further configured to determine whether the request comes from a designated account, and if not, prohibit processing of the service function corresponding to the request.
[0061] According to a specific implementation manner, the first header information is private, and the second header information is public.
[0062] According to a specific implementation method, the source of the request is distinguished based on the value of the first information, and corresponding operations are performed according to the source of the request, including: when the value of the first information is the first header information, the request is judged to be from the intranet, and the business function corresponding to the request is processed normally; and when the value of the first information is the second header information, the request is judged to be from the Internet, and the processing of the business function corresponding to the request is prohibited.
[0063] According to a specific implementation, the device is also used to monitor the source of the request, and when the number of Internet requests from the same source reaches a preset number within a preset time period, an alarm is issued and the request from the source is intercepted.
[0064] According to a specific implementation manner, the intranet proxy server is the intranet Nginx, and the Internet proxy server is the Internet Nginx.
[0065] According to a specific implementation manner, the name of the first information is from-c.
[0066] An embodiment of the present application provides a storage medium on which a program is stored. When the program is executed by a processor, the method for distinguishing between internal and external network requests is implemented.
[0067] An embodiment of the present application provides a processor, which is used to run a program, wherein the program executes the above-mentioned method for distinguishing between internal and external network requests when running.
[0068] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor A01, a network interface A02, a memory (not shown in the figure) and a database (not shown in the figure) connected via a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02 and a database (not shown in the figure). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A04. The database of the computer device is used to store application service data. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program B02 is executed by the processor A01, a method for distinguishing between internal and external network requests is implemented.
[0069] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0070] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the method for initializing the internal and external network request distinction according to any embodiment of the present invention.
[0071] In one embodiment, the device for distinguishing between internal and external network requests provided by the present application can be implemented in the form of a computer program. The computer program can be used in Figure 5 The computer device shown in the figure is run. The memory of the computer device can store various program modules that constitute the device for distinguishing between internal and external network requests, for example, Figure 4 The proxy server 101 and the application server 102 are shown. The computer program composed of various program modules enables the processor to execute the steps of the method for distinguishing internal and external network requests in various embodiments of the present application described in this specification.
[0072] Figure 5 The computer device shown can be Figure 4 The proxy server 101 in the apparatus for distinguishing between internal and external network requests performs steps S101 and S102. The computer device can perform steps S103 and S104 through the application server 102.
[0073] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0074] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0075] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0076] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0077] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0078] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0079] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0080] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0081] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for distinguishing internal and external network requests, characterized in that: The method comprises: receiving a user's request, wherein the request includes header information; Setting first information for the header information, including a name of the first information and a value of the first information; acquiring a value of the first information based on the name of the first information, and distinguishing a source of the request based on the value of the first information; and According to the source of the request, perform the corresponding operation. Among them, the source of the request includes an intranet or the Internet. When the request comes from the intranet, the request is received by the intranet proxy server, and the value of the first information is set to the first header information. When the request comes from the Internet, the request is received by the Internet proxy server, and the value of the first information is set to the second header information.
2. The method according to claim 1, characterized in that The first header information is private, and the second header information is public.
3. The method according to claim 1, characterized in that Distinguishing the source of the request based on the value of the first information, and performing corresponding operations according to the source of the request include: When the value of the first information is the first header information, determining that the request comes from the intranet, and processing the service function corresponding to the request normally; and When the value of the first information is the second header information, it is determined that the request comes from the Internet, and processing of the business function corresponding to the request is prohibited.
4. The method according to claim 1, characterized in that: The method further comprises: Before setting the first information for the header information, determine whether the request carries the first information; if the request carries the first information, reset the value of the first information to overwrite the original value.
5. The method according to claim 1, characterized in that The method further comprises: Determine whether the request comes from a specified account. If not, prohibit processing the business function corresponding to the request.
6. The method according to claim 1, characterized in that The method further comprises: The source of the request is monitored, and when the number of Internet requests from the same source reaches a preset number within a preset time period, an alarm is issued and the request from the source is intercepted.
7. The method according to claim 1, characterized in that The intranet proxy server is the intranet Nginx, and the Internet proxy server is the Internet Nginx.
8. The method according to claim 1, characterized in that: The name of the first information is from-c.
9. A device for distinguishing between internal and external network requests, characterized in that: The device comprises: A proxy server, configured to receive a user's request, the request including header information, and set first information for the header information, including a name of the first information and a value of the first information; and an application server, configured to obtain a value of the first information based on the name of the first information, distinguish a source of the request based on the value of the first information, and perform a corresponding operation according to the source of the request, The source of the request includes an intranet or the Internet, and the proxy server includes an intranet proxy server and an Internet proxy server. When the request comes from the intranet, the request is received by the intranet proxy server, and the value of the first information is set as the first header information. When the request comes from the Internet, the request is received by the Internet proxy server, and the value of the first information is set as the second header information.
10. The device according to claim 9, characterized in that The proxy server is further configured to determine whether the request carries the first information, and if the request carries the first information, reset the value of the first information to overwrite the original value.
11. The device according to claim 9, characterized in that The application server is further configured to determine whether the request comes from a designated account, and if not, prohibit processing of the service function corresponding to the request.
12. A processor, characterized in that: The method is configured to execute the method for distinguishing internal and external network requests according to any one of claims 1 to 8.
13. A machine-readable storage medium having instructions stored thereon, characterized in that: When the instruction is executed by a processor, the processor is configured to execute the method for distinguishing between internal and external network requests according to any one of claims 1 to 8.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the method for distinguishing between internal and external network requests according to any one of claims 1 to 8.
Citation Information
Patent Citations
Physical channel uncoupled power grid internal and external network isolation method with double feedback and double isolation
CN110557388A
Intranet access method and system based on proxy server and electronic equipment
CN111200655A
Address information processing method and apparatus, electronic device, and storage medium
CN112930664A
Address information processing method and apparatus, electronic device, and storage medium
WO2020113478A1
Cross-chain communication method and apparatus for internal network and external network, computer device, and storage medium
WO2022142405A1