Cross-domain request processing method and device based on load balancing software
Through load balancing software, the security policy and data format are judged, and the problems of low security and poor compatibility of cross-domain requests in the existing technology are solved, achieving higher security and compatibility.
Patent Information
- Application Number
- CN202411608020.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-18
AI Technical Summary
Existing cross-domain request processing technologies have problems of low security and insufficient compatibility processing.
Resource requests are obtained through load balancing software to determine whether they comply with security policies. If they comply with them, they are determined whether they are cross-domain resource requests, and format the requests are converted and sent according to the data format of the recipient.
Improves security of cross-domain requests, avoids unauthorized cross-domain access, solves compatibility issues, improves user experience and ensures consistency and reliability of cross-domain requests.
Smart Images

Figure CN119484091A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer security technology, and in particular to a cross-domain request processing method and device based on load balancing software. Background Art
[0002] When a browser sends a request, if the target URL is inconsistent with the domain name of the current page, it will be restricted by the same-origin policy. The same-origin policy is a security mechanism in the browser that is used to prevent malicious websites from stealing user data or performing dangerous operations. The policy requires that scripts can only read and write content from the same source (protocol, domain name, port) as the current page, thereby avoiding security risks caused by cross-domain access.
[0003] However, in actual development, cross-domain access is a common requirement, especially when resources need to be obtained from different sources, solving cross-domain problems becomes crucial. In order to achieve cross-domain access, Cross-Origin Resource Sharing (CORS) has become the current mainstream solution. CORS allows clients to initiate cross-domain requests by setting relevant HTTP header information on the server side, supporting simple and complex requests. However, improper CORS configuration may allow untrusted sources to access resources, posing security risks. In addition, different browsers do not support CORS to the same extent, which may lead to compatibility issues. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a cross-domain request processing method and device based on load balancing software to solve the problems of low security and insufficient compatibility in the current cross-domain request processing.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] The first aspect of the present invention discloses a cross-domain request processing method based on load balancing software, the method comprising:
[0007] Obtaining a resource request through the load balancing software, wherein the resource request at least includes identification information of a recipient receiving the resource request;
[0008] Determining whether the resource request complies with the security policy;
[0009] If it complies with the security policy, determining whether the resource request is a cross-domain resource request according to the identification information;
[0010] If it is a cross-domain resource request, obtain the corresponding data format of the recipient;
[0011] The resource request is format-converted according to the data format to obtain the converted resource request and send it to the recipient.
[0012] Preferably, the determining whether the resource request complies with the security policy includes:
[0013] Obtaining a header identification field of the resource request, and detecting whether a sender corresponding to the header identification field is any preset sender in a database;
[0014] When the sender corresponding to the header identification field is any preset sender in the database, detecting whether the resource request is valid according to the header configuration of the resource request;
[0015] If the resource request is valid, determining that the resource request complies with the security policy;
[0016] If the resource request is invalid, it is determined that the resource request does not comply with the security policy.
[0017] Preferably, judging whether the resource request is a cross-domain resource request according to the identification information includes:
[0018] Acquire the domain name, protocol and port corresponding to the sender, and acquire the domain name, protocol and port corresponding to the receiver according to the identification information;
[0019] Determine whether the domain name, protocol and port corresponding to the sender are consistent with the domain name, protocol and port corresponding to the receiver;
[0020] If they are consistent, it is determined that the resource request is a same-source request;
[0021] If they are inconsistent, it is determined that the resource request is a cross-domain resource request.
[0022] Preferably, converting the format of the resource request according to the data format, obtaining the converted resource request and sending it to the recipient, comprises:
[0023] Calling the LUA module through the load balancing software;
[0024] The current data format of the resource request is converted into the data format through the LUA module, and the converted resource request is obtained and sent to the recipient.
[0025] Preferably, before obtaining the resource request through the load balancing software, the process further includes:
[0026] Get the configuration file of the initial load balancing software;
[0027] The protocol type, content type and routing strategy supported by the initial load balancing software are modified in the configuration file to obtain the load balancing software.
[0028] A second aspect of the present invention discloses a cross-domain request processing device based on load balancing software, the device comprising:
[0029] A first acquisition unit, configured to acquire a resource request through a load balancing software, wherein the resource request at least includes identification information of a recipient of the resource request;
[0030] A first judging unit, configured to judge whether the resource request complies with a security policy;
[0031] A second judgment unit, configured to judge whether the resource request is a cross-domain resource request according to the identification information if the security policy is met;
[0032] A second acquisition unit, configured to acquire a data format corresponding to the receiver if the request is a cross-domain resource request;
[0033] The conversion unit is used to convert the format of the resource request according to the data format, obtain the converted resource request and send it to the recipient.
[0034] Preferably, the first judging unit includes:
[0035] A first detection module, used to obtain a header identification field of the resource request, and detect whether a sender corresponding to the header identification field is any preset sender in a database;
[0036] A second detection module, configured to detect whether the resource request is valid according to the header configuration of the resource request when the sender corresponding to the header identification field is any preset sender in the database;
[0037] A first determination module, configured to determine whether the resource request complies with a security policy if the resource request is valid;
[0038] The second determination module is configured to determine that the resource request does not comply with a security policy if the resource request is invalid.
[0039] Preferably, the second judgment unit includes:
[0040] An acquisition module, used to acquire the domain name, protocol and port corresponding to the sender, and acquire the domain name, protocol and port corresponding to the receiver according to the identification information;
[0041] A judgment module, used to judge whether the domain name, protocol and port corresponding to the sender are consistent with the domain name, protocol and port corresponding to the receiver;
[0042] A third determination module, configured to determine that the resource request is a same-source request if they are consistent;
[0043] The fourth determination module is used to determine that the resource request is a cross-domain resource request if there is inconsistency.
[0044] Preferably, the conversion unit comprises:
[0045] A calling module, used to call the LUA module through the load balancing software;
[0046] The conversion module is used to convert the current data format of the resource request into the data format through the LUA module, obtain the converted resource request and send it to the recipient.
[0047] Preferably, the device further comprises:
[0048] A third acquisition unit is used to acquire a configuration file of an initial load balancing software;
[0049] The modification unit is used to modify the protocol type, content type and routing strategy supported by the initial load balancing software in the configuration file to obtain the load balancing software.
[0050] Based on the above-mentioned embodiment of the present invention, a cross-domain request processing method and device based on load balancing software are provided. Obtain a resource request through the load balancing software; if the resource request complies with the security policy and the resource request is a cross-domain resource request, obtain the corresponding data format of the recipient; convert the resource request according to the data format, obtain the converted resource request and send it to the recipient. The simplified load balancing software configuration reduces the configuration complexity and error probability, easily handles cross-domain requests, and avoids the problem of cross-domain restrictions when a system wants to obtain resources from other systems after multiple systems are integrated. By determining whether the resource request complies with the security policy, it helps to effectively prevent unauthorized cross-domain access and prevent access from untrusted sources. The format conversion of resource requests is realized through load balancing software, which avoids compatibility issues, improves user experience, and ensures the consistency and reliability of cross-domain requests. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0052] Figure 1A flow chart of a cross-domain request processing method based on load balancing software provided by an embodiment of the present invention;
[0053] Figure 2 A flowchart for determining whether a resource request complies with a security policy based on a header identification field and a header configuration provided by an embodiment of the present invention;
[0054] Figure 3 A flowchart for determining whether a resource request is a cross-domain resource request based on identification information provided by an embodiment of the present invention;
[0055] Figure 4 A structural block diagram of a cross-domain request processing device based on load balancing software provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising 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, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0058] As can be seen from the background technology, cross-origin resource sharing allows clients to initiate cross-domain requests by setting relevant HTTP header information on the server side, supporting simple and complex requests. However, improper CORS configuration may allow untrusted sources to access resources, posing security risks. In addition, different browsers have different levels of support for CORS, which may cause compatibility issues.
[0059] Therefore, an embodiment of the present invention provides a cross-domain request processing method and device based on load balancing software. Obtain a resource request through the load balancing software; if the resource request complies with the security policy and the resource request is a cross-domain resource request, obtain the corresponding data format of the recipient; convert the resource request according to the data format, obtain the converted resource request and send it to the recipient. The simplified load balancing software configuration reduces the configuration complexity and error probability, easily handles cross-domain requests, and avoids the problem of cross-domain restrictions when a system wants to obtain resources from other systems after multiple systems are integrated. By determining whether the resource request complies with the security policy, it helps to effectively prevent unauthorized cross-domain access and prevent access from untrusted sources. The format conversion of resource requests is realized through load balancing software, which avoids compatibility issues, improves user experience, and ensures the consistency and reliability of cross-domain requests.
[0060] See also Figure 1 , shows a flow chart of a cross-domain request processing method based on load balancing software provided by an embodiment of the present invention, the method comprising:
[0061] Step S101: Obtain resource requests through load balancing software.
[0062] It should be noted that the resource request at least includes identification information of a recipient of the resource request.
[0063] It is understandable that the load balancing software (InforSuiteLB) is a high-performance HTTP server and reverse proxy server, which is widely used for load balancing and processing HTTP requests. The configuration of InforSuiteLB is simple and flexible, and can meet various cross-domain requirements. This helps to improve the security of cross-domain requests and prevent unauthorized access.
[0064] In some embodiments, a universal configuration is designed for the load balancing software to improve compatibility with different browsers and ensure consistency and reliability of cross-domain requests. Specifically, a configuration file of the initial load balancing software is obtained; the protocol type, content type, and routing strategy supported by the initial load balancing software are modified in the configuration file to obtain the load balancing software.
[0065] It should be noted that the cross-domain problem can be solved by designing a universal configuration for the load balancing software, so as to avoid the problem of a system being subject to cross-domain restrictions when it wants to obtain resources from other systems after multiple systems are integrated.
[0066] In the specific implementation of step S101, the resource request sent by the sender is obtained through the load balancing software.
[0067] Step S102: Determine whether the resource request complies with the security policy.
[0068] It should be noted that determining whether a resource request complies with security policies mainly depends on the identification of source information (such as the Origin field in the resource request header), and the validity of the resource request is verified by the load balancing software.
[0069] It is understandable that subsequent operations can only be performed when the resource request complies with the security policy, that is, when it is determined that the resource request can be processed safely and effectively.
[0070] In the specific implementation of step S102, the header identification field and header configuration of the resource request are obtained, and whether the resource request complies with the security policy is determined according to the header identification field and the header configuration.
[0071] The specific judgment process is detailed in the embodiment of the present invention. Figure 2 The content in. Figure 2 Included:
[0072] Step S201: Obtain the header identification field of the resource request, and detect whether the sender corresponding to the header identification field is any preset sender in the database. If the sender corresponding to the header identification field is any preset sender in the database, execute step S202; if the sender corresponding to the header identification field is not any preset sender in the database, it is determined that the resource request does not comply with the security policy.
[0073] It is understandable that a plurality of allowed senders are pre-stored in the database. If the sender of the resource request is not in the database, the resource request can be rejected to avoid cross-site malicious attacks.
[0074] In the specific implementation of step S201, the header identification field (e.g., Origin field) of the resource request is obtained, and it is detected whether the sender corresponding to the header identification field is any preset sender in the database. If the sender corresponding to the header identification field is any preset sender in the database, it indicates that the sender corresponding to the resource request is an allowed sender, and step S202 is executed; if the sender corresponding to the header identification field is not any preset sender in the database, it indicates that the sender corresponding to the resource request is an unallowed sender, and then it is determined that the resource request does not comply with the security policy.
[0075] It should be noted that the Origin field is a header sent by the browser to indicate the source domain name of the request. Therefore, the sender of the resource request can be determined based on the Origin field.
[0076] Step S202: When the sender corresponding to the header identification field is any preset sender in the database, detect whether the resource request is valid according to the header configuration of the resource request. If the resource request is valid, execute step S203; if the resource request is invalid, execute step S204.
[0077] It should be noted that the header configuration of the resource request is such as Access-Control-Allow-Origin (specifies the source allowed to access) and Access-Control-Allow-Methods (specifies the allowed request methods).
[0078] In the specific implementation of step S202, when the sender corresponding to the header identification field is any preset sender in the database, the header configuration of the resource request is obtained, and whether the resource request is valid is detected based on the header configuration. If the resource request is valid, step S203 is executed; if the resource request is invalid, step S204 is executed.
[0079] Step S203: Determine whether the resource request complies with the security policy.
[0080] In the specific process of implementing step S203, if the resource request is valid, it is determined that the resource request complies with the security policy.
[0081] Step S204: Determine whether the resource request does not comply with the security policy.
[0082] In the process of specifically implementing step S204, if the resource request is invalid, it is determined that the resource request does not comply with the security policy, and the process ends.
[0083] It should be noted that security policies help to regulate and screen requests, ensuring that only requests that meet the predetermined conditions can enter the system. Through this process, potential security incidents such as data leakage, information tampering, and denial of service attacks (DoS) can be effectively reduced.
[0084] Step S103: If it complies with the security policy, determine whether the resource request is a cross-domain resource request based on the identification information.
[0085] In the specific implementation of step S103, if the security policy is met, it is determined whether the source of the resource request is inconsistent with the recipient according to the identification information, that is, whether the resource request is a cross-domain resource request. If the resource request is a cross-domain resource request, step S104 is executed; if the resource request is not a cross-domain resource request, the resource request is sent to the recipient.
[0086] The specific judgment process is detailed in the embodiment of the present invention. Figure 3 The content in Figure 3 include:
[0087] Step S301: Acquire the domain name, protocol and port corresponding to the sender, and acquire the domain name, protocol and port corresponding to the receiver according to the identification information.
[0088] In the specific implementation of step S301, the domain name, protocol and port corresponding to the sender of the resource request are obtained, and the domain name, protocol and port corresponding to the receiver of the resource request are obtained according to the identification information in the resource request.
[0089] Step S302: Determine whether the domain name, protocol and port corresponding to the sender are consistent with the domain name, protocol and port corresponding to the receiver.
[0090] In the specific implementation of step S302, it is determined whether the domain name corresponding to the sender is consistent with the domain name corresponding to the receiver; whether the protocol corresponding to the sender is consistent with the protocol corresponding to the receiver; and whether the port corresponding to the sender is consistent with the port corresponding to the receiver. When the domain name, protocol and port corresponding to the sender are consistent with the domain name, protocol and port corresponding to the receiver, step S303 is executed; if the domain name, protocol and port corresponding to the sender are not completely consistent with the domain name, protocol and port corresponding to the receiver, step S304 is executed.
[0091] Step S303: Determine whether the resource request is a same-origin request.
[0092] In the specific implementation of step S303, when the domain name, protocol and port corresponding to the sender are consistent with the domain name, protocol and port corresponding to the receiver, it is determined that the resource request is a same-origin request.
[0093] Step S304: Determine whether the resource request is a cross-domain resource request.
[0094] In the specific implementation of step S304, if the domain name, protocol and port corresponding to the sender are not completely consistent with the domain name, protocol and port corresponding to the receiver, it is determined that the resource request is a cross-domain resource request.
[0095] Step S104: If it is a cross-domain resource request, obtain the corresponding data format of the recipient.
[0096] It is understandable that, since different system application fields may recognize different data formats, the format of the resource request needs to be converted into a data format that can be recognized by the recipient.
[0097] In the process of specifically implementing step S104, when it is determined that the resource request is a cross-domain resource request, a data format corresponding to the receiver of the resource request is obtained, that is, a data format that can be recognized by the receiver.
[0098] Step S105: convert the resource request according to the data format, obtain the converted resource request and send it to the recipient.
[0099] In the process of implementing step S105, the LUA module is called through the load balancing software; the current data format of the resource request is converted into a data format recognizable by the receiver through the LUA module, and the converted resource request is obtained and sent to the receiver, so that the receiver can feed back the corresponding information to the sender according to the resource request.
[0100] In the embodiment of the present invention, the configuration complexity and error probability are reduced through simplified load balancing software configuration, and cross-domain requests are easily processed. Through accurate header configuration and header identification fields, it is possible to effectively determine whether the resource request complies with the security policy, which helps to effectively prevent unauthorized cross-domain access and prevent access from untrusted sources. Through load balancing software, a unified processing method for cross-domain resource requests in different browsers is implemented, which avoids compatibility issues, improves user experience, and ensures the stability of cross-domain requests.
[0101] Corresponding to the cross-domain request processing method based on load balancing software provided in the above embodiment of the present invention, see Figure 4 , shows a structural block diagram of a cross-domain request processing device based on load balancing software provided in an embodiment of the present invention.
[0102] The processing device includes: a first acquisition unit 401 , a first judgment unit 402 , a second judgment unit 403 , a second acquisition unit 404 and a conversion unit 405 .
[0103] The first acquisition unit 401 is used to acquire a resource request through the load balancing software, where the resource request at least includes identification information of a recipient of the resource request.
[0104] The first determination unit 402 is configured to determine whether the resource request complies with the security policy.
[0105] The second judging unit 403 is used to judge whether the resource request is a cross-domain resource request according to the identification information if it complies with the security policy. If it is a cross-domain resource request, the second obtaining unit 404 is executed.
[0106] The second acquisition unit 404 is used to acquire a corresponding data format of the receiver if it is a cross-domain resource request.
[0107] The conversion unit 405 is used to convert the format of the resource request according to the data format, obtain the converted resource request and send it to the recipient.
[0108] In the embodiment of the present invention, the configuration complexity and error probability are reduced through simplified load balancing software configuration, and cross-domain requests are easily processed. Through accurate header configuration and header identification fields, it is possible to effectively determine whether the resource request complies with the security policy, which helps to effectively prevent unauthorized cross-domain access and prevent access from untrusted sources. Through load balancing software, a unified processing method for cross-domain resource requests in different browsers is implemented, which avoids compatibility issues, improves user experience, and ensures the stability of cross-domain requests.
[0109] Combination Figure 4 As shown in the content, the first judgment unit 402 includes: a first detection module, a second detection module, a first determination module and a second determination module.
[0110] The first detection module is used to obtain a header identification field of a resource request and detect whether a sender corresponding to the header identification field is any preset sender in a database.
[0111] The second detection module is used to detect whether the resource request is valid according to the header configuration of the resource request when the sender corresponding to the header identification field is any preset sender in the database. If the resource request is valid, the first determination module is executed; if the resource request is invalid, the second determination module is executed.
[0112] The first determination module is used to determine whether the resource request complies with the security policy if the resource request is valid.
[0113] The second determination module is configured to determine that the resource request does not comply with the security policy if the resource request is invalid.
[0114] Combination Figure 4 As shown in the content, the second judgment unit 403 includes: an acquisition module, a judgment module, a third determination module and a fourth determination module.
[0115] The acquisition module is used to obtain the domain name, protocol and port corresponding to the sender, and to obtain the domain name, protocol and port corresponding to the receiver according to the identification information.
[0116] The judgment module is used to judge whether the domain name, protocol and port corresponding to the sender are consistent with the domain name, protocol and port corresponding to the receiver. If the domain name, protocol and port corresponding to the sender are consistent with the domain name, protocol and port corresponding to the receiver, the third determination module is executed; if the domain name, protocol and port corresponding to the sender are not completely consistent with the domain name, protocol and port corresponding to the receiver, the fourth determination module is executed.
[0117] The third determination module is used to determine that the resource request is a same-source request if they are consistent.
[0118] The fourth determination module is used to determine that the resource request is a cross-domain resource request if there is inconsistency.
[0119] Combination Figure 4 The content shown, the conversion unit 405, includes: a calling module and a conversion module.
[0120] The calling module is used to call the LUA module through the load balancing software.
[0121] The conversion module is used to convert the current data format of the resource request into a data format through the LUA module, obtain the converted resource request and send it to the recipient.
[0122] Combination Figure 4 The content shown, the device also includes: a third acquisition unit and a modification unit.
[0123] The third acquisition unit is used to acquire the configuration file of the initial load balancing software.
[0124] The modification unit is used to modify the protocol type, content type and routing strategy supported by the initial load balancing software in the configuration file to obtain the load balancing software.
[0125] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0126] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0127] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A cross-domain request processing method based on load balancing software, characterized in that: The method comprises: Obtaining a resource request through the load balancing software, wherein the resource request at least includes identification information of a recipient receiving the resource request; Determining whether the resource request complies with the security policy; If it complies with the security policy, determining whether the resource request is a cross-domain resource request according to the identification information; If it is a cross-domain resource request, obtain the corresponding data format of the recipient; The resource request is format-converted according to the data format to obtain the converted resource request and send it to the recipient.
2. The method according to claim 1, characterized in that The determining whether the resource request complies with the security policy includes: Obtaining a header identification field of the resource request, and detecting whether a sender corresponding to the header identification field is any preset sender in a database; When the sender corresponding to the header identification field is any preset sender in the database, detecting whether the resource request is valid according to the header configuration of the resource request; If the resource request is valid, determining that the resource request complies with the security policy; If the resource request is invalid, it is determined that the resource request does not comply with the security policy.
3. The method according to claim 1, characterized in that The determining, according to the identification information, whether the resource request is a cross-domain resource request includes: Acquire the domain name, protocol and port corresponding to the sender, and acquire the domain name, protocol and port corresponding to the receiver according to the identification information; Determine whether the domain name, protocol and port corresponding to the sender are consistent with the domain name, protocol and port corresponding to the receiver; If they are consistent, it is determined that the resource request is a same-source request; If they are inconsistent, it is determined that the resource request is a cross-domain resource request.
4. The method according to claim 1, characterized in that: The converting the format of the resource request according to the data format to obtain the converted resource request and sending it to the receiving party includes: Calling the LUA module through the load balancing software; The current data format of the resource request is converted into the data format through the LUA module, and the converted resource request is obtained and sent to the recipient.
5. The method according to claim 1, characterized in that Before obtaining resource requests through the load balancing software, it also includes: Get the configuration file of the initial load balancing software; The protocol type, content type and routing strategy supported by the initial load balancing software are modified in the configuration file to obtain the load balancing software.
6. A cross-domain request processing device based on load balancing software, characterized in that: The device comprises: A first acquisition unit, configured to acquire a resource request through a load balancing software, wherein the resource request at least includes identification information of a recipient of the resource request; A first judging unit, configured to judge whether the resource request complies with a security policy; A second judgment unit, configured to judge whether the resource request is a cross-domain resource request according to the identification information if the security policy is met; A second acquisition unit, configured to acquire a data format corresponding to the receiver if the request is a cross-domain resource request; The conversion unit is used to convert the format of the resource request according to the data format, obtain the converted resource request and send it to the recipient.
7. The device according to claim 6, characterized in that The first judging unit includes: A first detection module, used to obtain a header identification field of the resource request, and detect whether a sender corresponding to the header identification field is any preset sender in a database; A second detection module, configured to detect whether the resource request is valid according to the header configuration of the resource request when the sender corresponding to the header identification field is any preset sender in the database; A first determination module, configured to determine whether the resource request complies with a security policy if the resource request is valid; The second determination module is configured to determine that the resource request does not comply with a security policy if the resource request is invalid.
8. The device according to claim 6, characterized in that The second judging unit includes: An acquisition module, used to acquire the domain name, protocol and port corresponding to the sender, and acquire the domain name, protocol and port corresponding to the receiver according to the identification information; A judgment module is used to judge whether the domain name, protocol and port corresponding to the sender are consistent with the domain name, protocol and port corresponding to the receiver; A third determination module, configured to determine that the resource request is a same-source request if the two are consistent; The fourth determination module is used to determine that the resource request is a cross-domain resource request if there is inconsistency.
9. The device according to claim 6, characterized in that The conversion unit comprises: A calling module, used for calling the LUA module through the load balancing software; The conversion module is used to convert the current data format of the resource request into the data format through the LUA module, obtain the converted resource request and send it to the recipient.
10. The device according to claim 6, characterized in that The device also includes: A third acquisition unit is used to acquire a configuration file of an initial load balancing software; The modification unit is used to modify the protocol type, content type and routing strategy supported by the initial load balancing software in the configuration file to obtain the load balancing software.