1.在配置最新的IOS app 微信授权登录时 SDK时,碰到一个问题。服务器端需要配置IOS唤起微信APP授权的通用链接地址。
2.关于通用链接
3. 必须将ios的配置文件放入网址根目录下的apple-app-site-association
文件。文件必须没有后缀且浏览器端访问时,会自动下载
讲到自动下载,我们就想到了http响应 我们加上响应头
application/octet-stream
它能帮我们实现文件的访问下载功能 给mime类型文件设置该响应头,就能实现文件的下载,那么如何配置没有后缀名的文件实现访问下载呢?我们找到apche 的配置文件httpd.conf
4.找到这段代码 这是mime_module设置 具体我们可以看apche conf 下的
mime.types`文件
<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig conf/mime.types
#AddType application/octet-stream text/plain
#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
AddType application/x-gzip .tgz
在它的尾部加入,防止被覆盖
<IfModule mime_module>
.....
</IfModule>
<FilesMatch "^[^.]+$">
ForceType application/octet-stream
</FilesMatch>
假如我们需要设置其它文件下载,则打开
mime.types
找到这段代码。将我们需要下载的文件后缀放入 并重启apche
application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy