这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@PeriniM
Copy link
Contributor

@PeriniM PeriniM commented Jul 25, 2024

Issue: sed -i "s|ultrasecretkey|$(openssl rand -hex 32)|g" searxng/settings.yml works for UNIX-based system. For windows the sed command is not available.

Solution: Added a note on the README.md to indicate a corrected command alternative for Windows users to generate the secret key and write it into searxng/settings.yml file:

$randomBytes = New-Object byte[] 32
(New-Object Security.Cryptography.RNGCryptoServiceProvider).GetBytes($randomBytes)
$secretKey = -join ($randomBytes | ForEach-Object { "{0:x2}" -f $_ })
(Get-Content searxng/settings.yml) -replace 'ultrasecretkey', $secretKey | Set-Content searxng/settings.yml

@unixfox unixfox merged commit de09409 into searxng:master Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants