快轉到主要內容

初識Well-Known URI

268 字1 分鐘00
作者Y Cheung

看NGINX配置SAMPLE時看到這樣一個BLOCK:

1# Allow "Well-Known URIs" as per RFC 5785
2    location ~* ^/.well-known/ {
3        allow all;
4    }

聯想到之前使用Let’s Encrypt SSL 證書的時候也有添加一個路徑配置是.well-known的,Y.Cheung 好奇這個路徑究竟有什麼用。

在「RFC5785」中描述如下:

A well-known URI is a URI [RFC3986] whose path component begins with the characters "/.well-known/", and whose scheme is "HTTP", "HTTPS", or another scheme that has explicitly been specified to use well- known URIs.

Applications that wish to mint new well-known URIs MUST register them, following the procedures in Section 5.1.

For example, if an application registers the name ’example’, the corresponding well-known URI on ‘http://www. example .com/’ would be ‘http://www. example .com/.well-known/example’.

Registered names MUST conform to the segment-nz production in [RFC3986].

Note that this specification defines neither how to determine the authority to use for a particular context, nor the scope of the metadata discovered by dereferencing the well-known URI; both should be defined by the application itself.

Typically, a registration will reference a specification that defines the format and associated media type to be obtained by dereferencing the well-known URI.

分享

相關文章

提交Facebook App Review

作者 Y Cheung255 字1 分鐘00

虽然之前提到的那个bug官方还没修复,不过先这样吧,先运行起来,噗噗~ 今天稍微做了一下样式化输出,然后限制输出500条信息,分页还没做(趴)。 因为要用到 user_groups …

FACEBOOK小项目暂停开发

作者 Y Cheung381 字1 分鐘00

翻墙不易,有时候想查找一下FACEBOOK私密群组里看到过的内容,很困难。于是便萌发了用facebook自身的API把所有旧帖抓下来存放本地的念头。

↑