Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/leehzl/cors

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/leehzl/cors

  • v0.0.0-20190211072847-673908589948
  • Source
  • Go
  • Socket score

Version published
Created
Source

cors

总结了跨域的一些问题,并根据CORS跨域原理浅析 文章,自己实现了go版本,复习下关于跨域访问的一些知识点。

简介

本例子将client端和server端部署在不同端口实现跨域,其中client在8000端口,server在8080端口

静态资源服务器

在Mac下,用nginx作为静态资源服务器,并将nginx的配置文件nginx.conf设置为

server {
        listen       8000;
        server_name  localhost;
        location / {
            root   /Users/leehzl/cors/client;
            index  index.html index.htm;
        }
}   

具体Mac下的nginx命令参考Mac利用Nginx搭建静态文件服务器

FAQs

Package last updated on 11 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc