我有一個簡單的服務器 {-# LANGUAGE OverloadedStrings #-}
import Web.Scotty
import Data.Text
import Data.Monoid (mconcat)
server :: ScottyM()
server = do
get "/" $ file "./index.html"
,我想對所有的航線如服務in
我在nodejs中創建了本地REST API服務器,它從本地Mongodb數據庫獲取數據。我還創建了一個基本網頁,它從本地請求服務器的數據。現在,當我嘗試從網頁中獲取數據,它給了我以下錯誤: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://loc