aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/http/headers/origin/index.html
blob: 4e18becbe90e3aedf1dd853accb960155cd3d7b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
title: Origin
slug: Web/HTTP/Headers/Origin
tags:
  - Reference
translation_of: Web/HTTP/Headers/Origin
---
<div>{{HTTPSidebar}}</div>

<p>L’en-tête de requête <strong><code>Origin</code></strong> indique la provenance de la requête. Il n’inclut aucune information de chemin, seulement le nom du serveur. Il est envoyé avec les requêtes {{Glossary("CORS")}}, ainsi que les requêtes {{HTTPMethod("POST")}}. Il est similaire à l’en-tête {{HTTPHeader("Referer")}}, mais, contrairement à ce dernier, il n’inclut pas le chemin complet.</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">Type d’en-tête</th>
   <td>{{Glossary("Request header")}}</td>
  </tr>
  <tr>
   <th scope="row">{{Glossary("Forbidden header name")}}</th>
   <td>oui</td>
  </tr>
 </tbody>
</table>

<h2 id="Syntaxe">Syntaxe</h2>

<pre class="syntaxbox">Origin: ""
Origin: &lt;scheme&gt; "://" &lt;hostname&gt; [ ":" &lt;port&gt; ]
</pre>

<p><code>Origin</code> peut être une chaîne vide : c’est utile, par exemple, si la source est une <code>data</code> URL.</p>

<h2 id="Directives">Directives</h2>

<dl>
 <dt>&lt;scheme&gt;</dt>
 <dd>Le protocole utilisé. Il s’agit en général du protocole HTTP ou de sa version sécurisée, HTTPS.</dd>
 <dt>&lt;hostname&gt;</dt>
 <dd>Le nom de domaine du serveur (for virtual hosting) ou l’IP.</dd>
 <dt>&lt;port&gt; {{optional_inline}}</dt>
 <dd>Un numéro de port TCP sur lequel le serveur écoute. Si aucun port n’est donné, le port par défaut pour le service demandé (p. ex. <code>80</code> pour une URL HTTP) est supposé.</dd>
</dl>

<h2 id="Exemples">Exemples</h2>

<pre>Origin: https://developer.mozilla.org</pre>

<h2 id="Spécifications">Spécifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Spécification</th>
   <th scope="col">Commentaire</th>
  </tr>
  <tr>
   <td>{{RFC("6454", "Origin", "7")}}</td>
   <td>Le concept de Web Origin</td>
  </tr>
  <tr>
   <td>{{SpecName('Fetch','#origin-header','Origin header')}}</td>
   <td>Remplace l’en-tête <code>Origin</code> tel que défini dans la RFC6454.</td>
  </tr>
 </tbody>
</table>

<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>

<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>

<p>{{Compat("http.headers.Origin")}}</p>

<h2 id="Voir_aussi">Voir aussi</h2>

<ul>
 <li>{{HTTPHeader("Host")}}</li>
 <li>{{HTTPHeader("Referer")}}</li>
 <li>La <a href="/fr/docs/Web/Security/Same-origin_policy">Same-origin policy</a></li>
</ul>