GithubHelp home page GithubHelp logo

cors's Introduction

Cors(Cross Origin Resource Sharing)

Client 실행

node ./src/clinet/client.js

Server 실행

node ./src/server/server.js

실행 방법

  1. chrome에서 http://localhost:5052 실행. CORS 발생 발생 전
  2. 조치 방법으로 서버 응답 시, res.header("Access-Control-Allow-Origin", "http://localhost:5502") 추가 조치 후

브라우저(Jvascript)가 SOP정책을 따르는 이유

기본적으로 자바 스크립트는 자신이 실행된 문서의 서버의 내용만 읽을 수 있다. 만약 다른 서버의 내용까지 읽을 수 있게된다면, 사용자의 키보드 입력을 가로채는 스크립트를 다른 페이지에 심을 수도 있을 것이다.
이처럼 보안상의 이슈로 자바스크립트 엔진 표준 스펙에는 동일 출처 정책이 포함되게 되었다

참조

CORS

cors's People

Contributors

kanghyungmin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.