chenhuiYj / chenhuiYj/note

跨域问题和解决方案

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
6
Forks
0
PR merge metrics
No merged PRs in 30d

Description

image

网上的针对跨域的解决方案有很多,大家参考着看就好。虽然罗列这么多,但是我只用过两种。
1、 jsonp
2、 document.domain + iframe
3、 location.hash + iframe
4、 window.name + iframe
5、 postMessage
6、 跨域资源共享(CORS)
7、 nginx代理
8、 nodejs中间件代理
9、 WebSocket协议

链接
前端跨域解决方法
预请求

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No target file, test, or specific documentation change is identified. Start by reviewing the existing list and its linked references, then establish the intended scope and location for the content; done should mean the cross-origin guidance has a defined, coherent structure and covers the selected solutions accurately.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nginx, nodejs
Domain
documentation, networking, web-dev
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.