Skip to content

Instantly share code, notes, and snippets.

View ensean's full-sized avatar
🏔️

ensean

🏔️
  • Guangzhou, China
View GitHub Profile
@ensean
ensean / cff_response_content_type_by_ua.js
Last active March 16, 2022 15:24
cff_response_content_type_by_ua
function handler(event) {
var response = event.response;
var request = event.request;
var ua = request.headers['user-agent']['value'].toLowerCase();
var headers = response.headers;
if (ua.indexOf('chrome') > -1) {
// Set the cache-control header
headers['content-type'] = {value: "application/vnd.android.package-archive"};
}
else if (ua.indexOf('firefox') > -1){
添加opentuna国内源
```shell
sudo tee /etc/yum.repos.d/mysql-community.repo<<EOF
[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=https://opentuna.cn/mysql/yum/mysql-connectors-community-el7-aarch64/
enabled=1
gpgcheck=1
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql