同源策略 英文Same-origin policy ,主要是針對 Web瀏覽器跨域安全性的專有名詞。
同源策略可防止惡意腳本通過頁面修改等方式,使網頁訪問不再規範內的惡意檔案 or 敏感資訊。
同源策略的條件必須符合 :
- 域名相同
- 埠號相同
- 協定相同
以上條件一項不符,均視為不符合同源策略。
以 https://domain.com/aaa.html?abc=1為例子,以下列舉範例,來判斷是否符合同源策略
URL | Outcome | Reason |
---|---|---|
https://domain.com/aaa.html?aaa/b.html | 同源 | |
http://domain.com/aaa.html?abc=1 | 不同源 | 協定不同 |
https://sub.domain.com/aaa.html?abc=1 | 不同源 | 域名不同 |
https://domain.com:55/aaa.html?abc=1 | 不同源 | 埠號不同 |
https://domain.com/aaa?s=123 | 同源 |
dagate
Do you mind if I quote a couple of your articles as long asI provide credit and sources back to your website?My blog site is in the very same niche as yours and my users would certainly benefit from some of the information you present here.Please let me know if this okay with you. Thanks!
thb değeri nedir
Very nice post. I just stumbled upon your blog and wanted to say that I’ve really enjoyed browsing your blog posts. In any case I’ll be subscribing to your feed and I hope you write again soon!
Create Account
I have read your article carefully and I agree with you very much. This has provided a great help for my thesis writing, and I will seriously improve it. However, I don’t know much about a certain place. Can you help me?
gateio
I have read your article carefully and I agree with you very much. This has provided a great help for my thesis writing, and I will seriously improve it. However, I don’t know much about a certain place. Can you help me?