We are already hereWeb3 Distributed Storage IPFS (Web3 Project 1 Practical Combat Part 4) Introduction to what is
IPFS
, and how to install it on your local computer. Although the previous article explained how to installIPFS
and made corresponding configurations, in the local development stage, the front end cannot always avoid跨域
this remote request.api
’s “common problem”.Obviously, for common problems like
跨域
, you only need to type ,搜索引擎
a> scheme. listed a lot of solutions for you and other keywords, after a while, ,reactjs 跨域
vue跨域
nextjs 跨域
搜索引擎
跨域
So, before writing
首页以卡片形式展示数据
, we need to configure跨域
in the project so that it can be saved onIPFS
Get the file.
Configure cross-domain
This article has been written for the fifth time. You must be aware that this project is built using create-next-app
scaffolding. In other words, the project is next.js
project, but it is also areact
project.
Open thenext.config.js
file in the project root directory. Add the content in the red box in the picture below.