Amazon CloudFront 允許帶有路徑的 Origin Name 了

剛剛看到的,Amazon CloudFront 允許 Origin Name 帶有 path 了:「Amazon CloudFront Now Allows Directory Path as Origin Name」。

For example, if you're using an Amazon S3 bucket as your origin, you can specify bucket-name.s3.amazonaws.com/production instead of just bucket-name.s3.amazonaws.com. Alternatively, if you have a custom web server with different content in different directories on the server, you can use the same physical server to serve multiple types of content via multiple CloudFront cache behaviors or distributions.

變得更方便,以往是直接開兩個不同的 bucket 放。

Amazon CloudFront 的新增功能

Amazon CloudFront 新增了 Whitelist Header 的功能:「Deliver Custom Content With CloudFront」。

如同在 post 裡說明的:

If you choose the Whitelist option, each header that you add to the list becomes part of the cache key for the URLs associated with the distribution.

有點像是 HTTP 協定裡 Vary 想要解決的問題,只是做在 CDN 這端。這個功能蠻多 CDN 都有,AWS 總算補上了...

這次除了可以針對 custom HTTP header 處理外,CloudFront 還做了不少事情:

  • Mobile Device Detection
  • Geo-Targeting
  • Multi-Site Hosting
  • Protocol Detection
  • CORS (Cross Origin Resource Sharing)

前兩項還蠻有意義的,這代表會有人幫你更新資料。而 CloudFront 總算是支援 CORS 了...

把 GitHub 上的 pull request 對應到 Git branch...

昨天看 Hacker News 的文摘看到的:「Checkout github pull requests locally」。

方法是對 remote "origin" 加上 fetch = +refs/pull/*/head:refs/remotes/origin/pr/*,這樣就會把 pull request 拉下來...

下面的 comment 也有不少討論可以看...

Amazon Web Services Console 加強 CloudFront 設定...

之前在 AWS Console 上一直沒辦法設定 AWS CloudFront 的 Custom Origin,必須透過 3rd-party 軟體設定,而現在總算是把這個功能補上去了:「Improved CloudFront Support in the AWS Management Console」。

直接拿 Demo 的圖,最重要的 Custom Origin 功能的畫面:

AWS CloudFront Custom Origin

不過好像還是沒看到 Purge...