Skip to content

Commit 6a1be4d

Browse files
committed
Make the related links section a feature of FAQ pages
1 parent 05df869 commit 6a1be4d

31 files changed

+113
-217
lines changed

_faq/a8d2.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
---
22
question: I've tried to implement CORS but it isn't working. What should I do next?
3+
related:
4+
- ea74
5+
- cdc8
6+
- b1b0
7+
- a313
8+
- b56b
39
---
410

511
First make sure you've understood how CORS works. If you aren't clear on that then you'll waste a lot of time trying
@@ -23,13 +29,3 @@ If you're seeing an `OPTIONS` request that you weren't expecting then see {% inc
2329
If you're seeing the warning *'Provisional headers are shown'* then see {% include faq-link.html faq="b56b" %}.
2430

2531
If you think all the headers look correct then you can check them using our [CORS header checker](/header-checker).
26-
27-
---
28-
29-
Related:
30-
31-
* {% include faq-link.html faq="ea74" %}
32-
* {% include faq-link.html faq="cdc8" %}
33-
* {% include faq-link.html faq="b1b0" %}
34-
* {% include faq-link.html faq="a313" %}
35-
* {% include faq-link.html faq="b56b" %}.

_faq/abe3.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
---
22
question: Why am I getting a CORS error when I'm not even using CORS?
3+
related:
4+
- d1a6
5+
- b667
6+
- f173
37
---
48

59
If your website has attempted to make an HTTP request to a different site then the browser will try to use CORS. You
@@ -8,11 +12,3 @@ and the browser will log a CORS error to the console.
812

913
Using the same domain with two different port numbers is not sufficient to avoid CORS. The port number is considered
1014
to be part of the *origin* when the browser decides whether or not to use CORS.
11-
12-
---
13-
14-
Related:
15-
16-
* {% include faq-link.html faq="d1a6" %}
17-
* {% include faq-link.html faq="b667" %}
18-
* {% include faq-link.html faq="f173" %}

_faq/b040.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
question: Why am I seeing a preflight OPTIONS request when I'm not setting any custom headers?
3+
related:
4+
- b56b
5+
- b7f6
36
---
47

58
The first step to debugging an unexpected preflight request is to check the request headers on the preflight request.
@@ -32,10 +35,3 @@ If you're using a library it may be automatically setting headers for you. Some
3235

3336
If you still can't find where the custom header is coming from then you may need to step through the code. Put a
3437
breakpoint just before your request and step into the library code to see exactly what is going on.
35-
36-
---
37-
38-
Related:
39-
40-
* {% include faq-link.html faq="b56b" %}
41-
* {% include faq-link.html faq="b7f6" %}

_faq/b1b0.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
question: Why can't I access the response headers in my JavaScript code?
3+
related:
4+
- b56b
35
---
46

57
By default, only the following response headers are exposed to JavaScript code for a CORS request:
@@ -19,9 +21,3 @@ been implemented in some browsers but at the time of writing it still isn't incl
1921
To expose other response headers you need to use `Access-Control-Expose-Headers`. See
2022
{% include external-link.html href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers" %}
2123
for more information.
22-
23-
---
24-
25-
Related:
26-
27-
* {% include faq-link.html faq="b56b" %}

_faq/b4d0.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
question: Why can't I see my request in the Network section of the developer tools?
3+
related:
4+
- b56b
35
---
46

57
First and foremost check for console errors. The simplest explanation for a missing request is that there's a bug in
@@ -32,9 +34,3 @@ were actually received.
3234

3335
It can be useful to check across multiple browsers. Using a new Incognito/Private window can also help to bypass any
3436
caching problems that might be interfering with your requests.
35-
36-
---
37-
38-
Related:
39-
40-
* {% include faq-link.html faq="b56b" %}

_faq/b56b.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
question: Why can't I access the response headers in Chrome's developer tools?
3+
related:
4+
- b4d0
5+
- b1b0
36
---
47

58
When you try to access the headers via the *Network* tab of Chrome's developer tools you may see the warning:
@@ -33,10 +36,3 @@ If you want to see the actual requests being made you have 3 options:
3336
3. Use Firefox instead.
3437

3538
Hopefully Chrome will fix the developer tools soon so that this is no longer a problem.
36-
37-
---
38-
39-
Related:
40-
41-
* {% include faq-link.html faq="b4d0" %}
42-
* {% include faq-link.html faq="b1b0" %}

_faq/b667.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
question: What does 'origin' mean?
3+
related:
4+
- fe2a
35
---
46

57
Consider the following URL:
@@ -23,9 +25,3 @@ The port may be omitted if it is the default port for the scheme, so `80` for `h
2325
When the browser makes a CORS request it will include the origin for the current page in the **Origin** request header.
2426

2527
In JavaScript you can access the current page's origin using `location.origin`.
26-
27-
---
28-
29-
Related:
30-
31-
* {% include faq-link.html faq="fe2a" %}

_faq/b6b0.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
---
22
question: How can I use cURL to test a preflight request?
3+
related:
4+
- b7f6
5+
- d1a6
6+
- c7f6
7+
- b56b
38
---
49

510
In Firefox you should be able to isolate the preflight `OPTIONS` request in the *Network* tab of the developer tools.
@@ -35,12 +40,3 @@ Breaking this down:
3540
`Access-Control-Request-Headers` if there are no custom headers.
3641
6. The final line is the URL of the target server. Again this is something you will need to change to match the request
3742
you are trying to make.
38-
39-
---
40-
41-
Related:
42-
43-
* {% include faq-link.html faq="b7f6" %}
44-
* {% include faq-link.html faq="d1a6" %}
45-
* {% include faq-link.html faq="c7f6" %}
46-
* {% include faq-link.html faq="b56b" %}

_faq/b7f6.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
---
22
question: What is a preflight request?
3+
related:
4+
- f173
5+
- b667
6+
- b6b0
7+
- b040
8+
- cd59
9+
- ffcc
10+
- b56b
311
---
412

513
The term is a reference to the preflight checks carried out by pilots.
@@ -76,15 +84,3 @@ No request body will be sent for a preflight request and the response body will
7684
Note that in current versions of Chrome the preflight request is not shown separately in the developer tools by default.
7785
See {% include faq-link.html faq="b56b" %} for more information, especially if you're seeing the message
7886
*'Provisional headers are shown'*.
79-
80-
---
81-
82-
Related:
83-
84-
* {% include faq-link.html faq="f173" %}
85-
* {% include faq-link.html faq="b667" %}
86-
* {% include faq-link.html faq="b6b0" %}
87-
* {% include faq-link.html faq="b040" %}
88-
* {% include faq-link.html faq="cd59" %}
89-
* {% include faq-link.html faq="ffcc" %}
90-
* {% include faq-link.html faq="b56b" %}

_faq/c320.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
question: Does CORS support HTTP redirects?
3+
related:
4+
- fe2a
5+
- e21d
36
---
47

58
Yes. CORS requests do support HTTP redirects so long as all the requests include the relevant CORS response headers.
@@ -28,10 +31,3 @@ If not done correctly this can change the request method to `GET`, which can tri
2831
response from the server. Inadvertently changing to a `GET` request will also cause the request body to be dropped.
2932

3033
Often the simplest solution is to use the final URL instead and skip the redirect altogether.
31-
32-
---
33-
34-
Related:
35-
36-
* {% include faq-link.html faq="fe2a" %}
37-
* {% include faq-link.html faq="e21d" %}

0 commit comments

Comments
 (0)