Skip to content

Instantly share code, notes, and snippets.

@mallendeo
Last active March 3, 2023 00:57
Show Gist options
  • Save mallendeo/b09965d1e7cc4c08b026ba09ef16b793 to your computer and use it in GitHub Desktop.
Save mallendeo/b09965d1e7cc4c08b026ba09ef16b793 to your computer and use it in GitHub Desktop.
Update all NGINX Proxy Manager hosts at once
// Run this on the browser dev console of nginx proxy manager
{
const wait = (t = 1000) => new Promise(r => setTimeout(r, t))
const rows = document.querySelectorAll('tbody tr')
const update = async () => {
await wait()
document.querySelector('#modal-dialog .btn.save').click()
await wait()
}
const main = async () => {
for (const row of rows) {
console.log(row.querySelector('.host-link').textContent)
row.querySelector('.item-action.dropdown .edit.dropdown-item').click()
await update()
}
}
main()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment