Front and rear end hosts configure access to problem-solving ideas

Background to the issue: the back-end development and testing required under the circumstances before and after the end of the separation configured hosts, who have this problem have RD, QA, PM, User

Test environment because the user can not use this configuration results in the use of online systems to initiate document affect users, while allowing users to mistakenly think that system problems and lead to increased communication costs.

Problem principle: a user visits online, but due to the influence of local hosts, the browser loads the resource test environment, resulting in a request issued by the real issue is the test environment, so users will think that the system problems.

Goal: when the user uses a problem, give clear hints and solutions, with RD and PM reduction of communication costs.

Research program:

1. The rear end of the check hosts,

Question: java can be done at present to detect local hosts, due to the back-end processes are deployed to the server, it can not meet the hosts check each PC side. PASS

  1. Check distal hosts

Question: js, node and other front-end language processing document flow and other unfriendly, while difficult, is equivalent to re-develop a set of hosts Update Tool (online ideas, can not solve the fundamental problem, PASS)

3.C, Python realization

Online there is a corresponding realization of ideas but need to install the appropriate client scripting tools, difficult to achieve (online ideas, can not fundamentally solve the problem, PASS)

4. intranet single sign-realization

inpass (Intranet SSO) support the corresponding domain name suffixes currently born to jump, but for the online environment, but initiate a request is initiated from a test environment can not judge, therefore PASS

Now we re-look at the issue:

Online user visits, environmental problems caused by the local user system is not available, it is possible to detect the loaded local environment,

Since most acquiring data interface is the use of a relative path, presentation of documents or other documents elastic block is an absolute path, whereby we need to get online system and initiate the domain which domain comparison document request,

If you are ending xxxx-inc.com or ending xxxtest.cn of said user's environment is right, otherwise it is wrong.

From the above, we can know that the solution is as follows:

1. The front end of the ajax request to initiate or documents required absolute path to match the domain name, the matching is successful, the normal launch, otherwise the bomb box prompts log in or play console, the user is prompted local environment have a problem ...

Program Benefits:

1. Simple, do not move the back-end, front-end developers simply can solve the problem, the code does not exceed 10 lines.

2. The above logic code line does not need to be deployed to resolve the issue. Even if there is no line to deploy to the problem, an error message is generated only in a test environment, allowing the user to the local environment is right by the logic.

3. After the user explicitly prompt can reduce the cost of communication, allowing users to experience better.

This article from the blog article multiple platforms OpenWrite release!
@ @ Architecture design engineering design services stability of the road

Guess you like

Origin www.cnblogs.com/coderManFans/p/11781322.html