Tag:Cross domain

  • An interpretation of the fetch method in H5


    1. Preface Since it’s a new method of H5, there must be some browsers that do not support this method The browser needs to add an additional Polyfill: [link]: https://github.com/fis-components/whatwg-fetch 2. usage Fech (grab): HTML: Fetch (‘/ users. HTML’) // a promise object is returned here. Unsupported browsers need corresponding ployfill or transcode through a […]

  • Several common methods of iframe cross domain


    background With the development of business, there will naturally be some public businesses that will be separated into public components and used by various projects. However, because the technical stacks used in each project are different, this common component cannot be easily referenced. To solve this problem, we write this component as a separate page […]

  • Solve the problem of using canvas to generate invitation posters with wechat avatars without wechat avatars


    Recently, I made a H5 page visited in wechat, long press the sharing picture to send the poster invited by friends, search the information on the Internet, come up with the solution, and use canvas to draw the page to generate pictures, Problem: Canvas images cross domain. Solution process (pit filling process): 1. From the […]

  • Note: nginx agent Axios request and precautions


    Recently, I wrote a small demo. Because I used the online data of a large factory and the interface was cross domain restricted, I used nginx agent to solve these problems. 1. Nginx.conf configuration information Becausenginx.confThere are many configuration information, this article only focuses on the followingaxiosAnd static resource request settings. By the way, I […]

  • Node.js express jQuery Ajax post options cross domain solution


    Just give the right answer. One server isnode.js & express:The simplest is to use expressjs / CORSinstallnpm install cors –saveIntroducevar cors = require(‘cors’);Useapp.use(cors());This completes the server side. Two clientsjs & jQuery:You can’t use shortcuts first$.post()It has to be used.$.ajax() $.ajax({ type: ‘POST’, url: ‘…’, data: JSON.stringify(params), processData: false, contentType: ‘application/json’, dataType: ‘json’ }).then(function(ret){ alert(ret); }); […]

  • Mido mall project (1)


    Mido mall project (1)1. When authorizing users, 1% is used, which means that any IP can connect to this database. In other words, if you change your computer, you can also connect to the database to continue development. grant all on meiduo_mall.* to ‘meiduo’@’%’;1. Storage of user informationUser table analysis IDUser namePasswordCell-phone numbermailboxIs administratorSign out […]

  • 11 interview questions of browser principle


    Browser and new technology Interview questions come from my project “front end interview and advanced guide” The content of this chapter about the principle of browser mainly comes from the working principle of browser. This is a very long article, which can be counted as a small book. It is highly recommended to read with […]

  • Restframework


    Catalog 1. Restful specification 2. initial DRF 2.1 simple understanding 2.1.1 what is DRF 2.1.2drf framework 2.1.3 what functions does DRF provide 2.2 use 2.3 custom serialization 3. DRF serialization 3.1 serialization 3.2 deserialization 4. screening 5. paging 5.1 introduction 5.2PageNumberPagination 5.3LimitOffffsetPagination 6. view 6.1APIView 6.2genericapiview [general view class] 7. version 8. certification 8.1 general […]

  • The solution of spring boot cross domain problem


    What is cross domain? Definition: the browser requests something under another domain name from the webpage of one domain name. Generally speaking, it is not allowed for a browser to access resources in the B domain directly from the a domain. If you want to access resources, you need to perform a step operation, which […]

  • Questions that the front-end interview will definitely ask


    Constantly updated, this is a super long article, which is my summary while interviewing. Also, this is a preliminary level (1-3 years) front-end interview, which may not involve too many algorithms. It can be summarized in several aspects: HTML CSS JavaScript Frame class Small program Other 1. HTML New features of H5 Semantics of labels […]

  • Spring boot 2. X (IV): spring boot custom web MVC configuration


    0. preparation Spring boot not only provides a fairly simple automatic configuration function, but also opens a very free and flexible configuration class. Spring MVC provides us with the webmvcconfigurationsupport class and an annotation @ enablewebmvc to help us reduce the declaration of configuration bean. This article briefly explains how to customize the web MVC […]

  • Detailed explanation of HTML5 window.postmessage and cross domain


    In the previous article, we talked about the browser homology strategy, which is to prevent pages from accessing each other’s methods and properties in different domains, and described the solutions proposed to solve the cross domain problem of homology strategy: sub domain agent, jsonp, CORS. This article will explain HTML5 window.postmessage in detail. With the […]