Drupal嵌入iframe的问题

admin 提交于 周二, 01/05/2021 - 14:44

iframe里的cookie需要设置SameSite=None,详细原因解释见:https://medium.com/trabe/cookies-and-iframes-f7cca58b3b9e

另外查到,Same origin需要有相同的协议(http或https),SameSite则不需要。

Nginx 1.19.3可以用proxy_cookie_flags的办法解决cookie问题,参考:

https://serverfault.com/questions/1010706/setup-samesite-none-value-in-nginx-webserver

 

Drupal 7方案(https),在settings.php文件里添加下面逻辑:

Drupal Password Policy模块翻译

admin 提交于 周四, 12/31/2020 - 09:52

完成了模块的英文到中文的翻译。由于Drupal翻译审核响应会很慢(可能几年都没人审核),目前只能手动导出,然后放到files/translations下。

https://localize.drupal.org/translate/languages/zh-hans/export?project=password_policy&status=0&release=507631&search=&author&context=all&limit=10&sid=0

标签

Homebrew

admin 提交于 周四, 12/24/2020 - 10:02

过一段时间没有使用,我们应该brew update更新。

遇到问题,可以运行brew doctor检测。

brew update 或 install可能都很慢,可以在后面加--verbose --debug看更多信息,了解进度。

如有需要使用mirror,下面是中科大源的设置方法:

替换brew.git:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

参考:https://lug.ustc.edu.cn/wiki/mirrors/help/brew.git/

How to build espeak-ng on Mac

admin 提交于 周一, 12/21/2020 - 09:35

(I assume you have already installed HomeBrew.)

1. Download source code

2. run ./confugre

$ ./configure

configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."

espeak-ng links are point to /usr/share,but home brew install those files in /usr/local/share。So we need to fix the link paths.

 

~/code/espeak-ng/m4$ ln -sf /usr/local/share/aclocal/ltversion.m4 

~/code/espeak-ng/m4$ ln -sf /usr/local/share/aclocal/ltsugar.m4