In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article shares with you about the methods of cross-domain configuration of Linux+apache. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
To understand cross-domain, you must first understand the same origin policy. Homologous policy is a very important security policy implemented in browsers for security considerations.
What is homologous:
URL consists of protocols, domain names, ports, and paths. If the protocols, domain names and ports of two URL are the same, they are of the same origin.
Homologous policy:
The same origin policy of the browser restricts "document" or scripts from different sources to read or set certain properties on the current "document".
Scripts loaded from one domain do not allow access to the document properties of another domain.
Edit apache configuration
Edit apache profile httpd.conf
Open extension
LoadModule headers_module modules/mod_headers.so
Increase configuration
The AllowOverride NoneHeader set Access-Control-Allow-Origin * / setting allows cross-domain domain Header set Access-Control-Allow-Methods * / / response headers to specify one or more methods allowed in response to access to the resource. The precheck request Header set Access-Control-Allow-Headers content-type,authorization / / response header indicates which HTTP header will make the actual request by providing Access-Control-Expose-Headers in response to a precheck request. The Header set Access-Control-Max-Age '1728000 response header indicates how long the result pre-check request (i.e. the headers contained in the information Access-Control-Allow-Methods and Access-Control-Allow-Headers) can be cached. Header set Content-Security-Policy upgrade-insecure-requests
You can learn about http protocol for detailed configuration.
Restart apapche
Service httpd restart
Thank you for reading! So much for sharing the method of cross-domain configuration of Linux+apache. I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.