Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: dynamically load IP addresses #2635

Merged
merged 2 commits into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions content/partials/firewall.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,22 @@ Codemagic requires direct access to the repositories for the following use cases

The following IP addresses must be allowed through the firewall (whitelisted):

{{< highlight Shell "style=rrt">}}
66.185.17.80/29
199.7.162.128/29
207.254.42.240/29
34.74.234.56/32
35.185.76.207/32
{{< /highlight >}}
<pre id="ip-addresses">Fetching IP addresses...</pre>

Since Codemagic needs to access the Git service, please allow ports that your service uses - usually the default SSH or HTTPS ports.

<script>
document.addEventListener('DOMContentLoaded', function() {
fetch('https://codemagic.io/api/v3/meta')
.then(response => response.json())
.then(data => {
const ipAddresses = data.data.address_prefixes
const ipList = ipAddresses.join('\n')
document.getElementById('ip-addresses').innerHTML = ipList
})
.catch(error => {
document.getElementById('ip-addresses').innerHTML = 'Failed to fetch IP addresses.'
console.error('Error fetching IP addresses:', error)
})
})
</script>