This time encountered Layui cross-domain request problem, on the internet to find a lot of response headers configuration model is not successful
Because the browser has a same-origin policy, if the address of the Layui (including the icon font file) is not in the same domain as your current page address, there will be an icon cross-domain issue. So either you put the Layui on the same server as the Web site, or you add properties to the response headers of the resource server where Layui resides:access-control-allow-origin: *
Because the loaded front file does not know why the configuration is not successful in the CSS
Wrote an Nginx configuration.
Location ~* \. (EOT|TTF|WOFF|SVG|OTF) $ {
Add_header Access-control-allow-origin *;
}
Determine the font file suffix loaded in access-control-allow-origin *;
CORS header missing ' access-control-allow-origin ' problem