The example of this article describes the PHP Web system multiple domain login failed to solve the problem, to share with you for your reference. The specific analysis is as follows:
The following is a simple logical structure that requires specific processing for a formal system.
Here is the need to note: Encryption and decryption must be done security verification. But this method is not perfect enough,
JQuery.support.cors = true;function Btnclick () {$.get ("Http://localhost:62733/Api/Test", {}, function (data) {alert (data.name);});[Crosssite]public class CrossSiteAttribute:System.Web.Http.Filters.ActionFilterAttribute{Private Const string origin = "origin";Access-control-allow-origin is a server-side return response header defined in HTML5 that addresses cross-domain permissions issues for resources such as fonts.Private Const string Accesscontrol
http//www.blogjava.net/qingshow/archive/2010/01/17/309846.html-------------------------------------------------------------------------------------use Tomcat to build a Web server target: Have your own website and domain name for free. Environment: Windows2003+jkd1.6+tomcat5.5+ Peanut Shell Dynamic Domain name 6.0My LAN IP:192.168.0.118Part One: Building a tomcat
Many webmaster friends like the site inside the thousand Luo Vientiane, everything should be integrated in. This causes the network structure in the directory too much, navigation clutter. In order to be able to provide a one-stop service! Now even Baidu, Sina, NetEase and other big companies can not do, then you could do it? Well, gossip is not much to say, get to the point:
Site structure of the use of neutron domain eight treasure:
Treasure one,
Web website Service:Apache the famous open source Web Service software, maintenance operations by the ASF Free Software FundOfficial site: http://httpd.apache.org/http://www.netcraft.com/ for various Web detailed statistics on the market share of the softwareLab Requirements:1, the establishment of HTTPD services, requirements:(1) Provide two name-based virtual h
There are win7 system users reflected in the process of operating system, often need to use a browser to browse the Web page, but in the browsing time, but encountered a normal network connection, the Web page can not open the situation, when the Web page prompts the domain name resolution error (Error code: 105), then
Several pages were developed today, but some of the HTTP interfaces on the page were called to render the page, because of cross-domain issues, but did not want to make the JSONP way, so get an Apache HTTP server to toss. This applies only to Linux 1. Download Apache httpd from Apache 2. After downloading the installation directory, open the httpd.conf configuration file of the Conf folder to modify 3. First modify the listen port such as 8081, after
Apache Virtual host is a kind of consent on the same machine, execute more than one site solution, at the same time will be able to Bondi two-level domain name to the specified folder. There are two types of virtual hosts. One is called IP-based (ip-based), and there is a name-based (name-based).The existence of a virtual host is transparent to the user.Say the name-based (name-based), IP-based. Please self-help Baidu. For example, this http://www.cnb
When deploying web services or web applications, many times I directly copy these projects to the wwwroot directory. If cross-origin problems occur, I can directly put the cross-origin files in this directory, in fact, we do not need to do this during deployment. First, this will make the wwwroot directory bigger, and this is generally on the system disk. Therefore, we often create virtual directories, use
Files: httpd.conf@ Open Virtual Hosts# Virtual HostsInclude conf/extra/httpd-vhosts.confFiles: httpd-vhosts.conf@ Configure a virtual hostDocumentRoot "E:/www/pz"ServerName to.pz.comOptions Indexes FollowSymLinksAllowOverride AllOrder Deny,allowAllow from allRequire all grantedErrorlog "Logs/dummy-host.example.com-error.log"Customlog "Logs/dummy-host.example.com-access.log" common@ Modify Host127.0.0.1 to.pz.comWampserver set Web site file path, virtu
Web. xml: ContentTwo:Modify port number to 80 port number: --> To modify the virtual path: Add Host# Localhost (DO NOT REMOVE) Start#127.0.0.1 localhost127.0.0.1 www.systest.comTo start Tomcat:Web Access notes directly from a domain name
The default Web site can be accessed via IP after installing Apache, so there may be some malicious domain names pointing to your site.
Encounter this kind of feeling can build a default site (note, to ensure that this site at the front of all sites, you can access this station via IP directly)
1. Modify the Web. config directly, but this is for all Action.Method 2.Add a category with the content shown below:Using system;using system.collections.generic;using system.linq;using system.web;using System;using System.web.http.filters;namespace workflow.filters{Public class Allowcrosssitejsonattribute: ActionFilterAttribute {public override void OnActionExecuted (Httpactionexecutedcontext ActionExecutedContext) { if
ArticleDirectory
1. What is cross-origin?
2. What should I do?
1. What is cross-origin?
To say cross-origin, let's talk about the "Same Origin Policy" first. The same origin policy means that scripts on the web page can only access the same origin as themselves (host + protocol + port) web page attributes and methods. For example, if you have loaded the token with IFRAME in your index.html.
In modern browsers, it imposes restrictions on the access to Javacript code, such as a page where JS cannot implement AJAX requests to non-homologous URLs to obtain data. At this point, the browser side will be error:No ' Access-control-allow-origin ' header is present on the requested resource. Origin ' http://localhost:3000 ' is therefore not allowed access. The response had HTTP status code 401.This security policy is also generally implemented for server side, such as Laravel, in which case
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.