0%

rails cors 跨域访问设置

gemfile

1
gem ‘rack-cors’, require: ‘rack/cors’

config/application.rb

1
2
3
4
5
6
config.middleware.insert_before 0, Rack::Cors do
allow do
origins ‘‘
resource ‘‘, headers: :any, methods: [:get, :post, :options]
end
end

Markdown 是一种轻量级的「标记语言」,它的优点很多,目前也被越来越多的写作爱好者,撰稿者广泛使用。看到这里请不要被「标记」、「语言」所迷惑,Markdown 的语法十分简单。常用的标记符号也不超过十个,这种相对于更为复杂的HTML 标记语言来说,Markdown 可谓是十分轻量的,学习成本也不需要太多,且一旦熟悉这种语法规则,会有一劳永逸的效果。

阅读全文 »

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

Create a page

1
$ hexo new page "New page"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

执行命令之前安装

yarn add hexo-deployer-git

1
2
3
$ hexo deploy
or
$ hexo d

More info: Deployment

搜索功能

1
yarn add hexo-generator-search