質問編集履歴
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -213,53 +213,3 @@
|
|
213
213
|
不足している情報などございましたら、ご指摘ください。
|
214
214
|
|
215
215
|
よろしくお願いいたします。
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
---
|
222
|
-
|
223
|
-
**追記(2016/04/04 7:00)**
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
###実行環境
|
228
|
-
|
229
|
-
[http://qanji.github.io/questionToday.html](http://qanji.github.io/questionToday.html)
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
###エラー内容
|
234
|
-
|
235
|
-
以下2つのエラー内容が吐かれております。
|
236
|
-
|
237
|
-
```
|
238
|
-
|
239
|
-
OPTIONS https://teratail.com/api/v1/questions?limit=1&page=1
|
240
|
-
|
241
|
-
```
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
```
|
246
|
-
|
247
|
-
XMLHttpRequest cannot load https://teratail.com/api/v1/questions?limit=1&page=1. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://qanji.github.io' is therefore not allowed access. The response had HTTP status code 501.
|
248
|
-
|
249
|
-
```
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
以下の記述を含めない場合、つまりアクセストークンなしのリクエストの場合は正常に機能しており、エラーも吐かれません。
|
254
|
-
|
255
|
-
```
|
256
|
-
|
257
|
-
//アクセストークンを仕込む
|
258
|
-
|
259
|
-
beforeSend: function(xhr){
|
260
|
-
|
261
|
-
xhr.setRequestHeader("Authorization", "Bearer " + "0123456789abcdef0123456789abcdef0123456789");
|
262
|
-
|
263
|
-
},
|
264
|
-
|
265
|
-
```
|