现在都是用 Kotlin Gradle DSL 来配置 Android 项目的

那么该如何自定义生成apk的文件名呢?

只需要在app目录下的build.gradle.kts的buildTypes中release处添加

1
2
3
4
5
6
7
applicationVariants.all {
outputs.all {
if (this is com.android.build.gradle.internal.api.BaseVariantOutputImpl) {
this.outputFileName = "XXX_${versionName}.apk"
}
}
}

即可

给 Waline 套上 Cloudflare 后,获取到的 IP 都是 CF 的,如何解决呢?

非常简单,只需在仓库里的index.cjs添加

1
think.app.proxyIpHeader = 'CF-Connecting-IP';

就行了

就像这样
1
2
3
4
5
6
7
8
9
10
const Application = require('@waline/vercel');

module.exports = Application({
plugins: [],
async postSave(comment) {
// do what ever you want after comment saved
},
});

think.app.proxyIpHeader = 'CF-Connecting-IP';

昨天买了个cn域名,就用来作网站吧
用的是 Hexo 加上 NexT 主题,托管服务是 Cloudflare Pages

0%