-
Notifications
You must be signed in to change notification settings - Fork 16
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
Get geolocation about a given IP address #138
Open
cegerhardson
wants to merge
29
commits into
main
Choose a base branch
from
ComputeAtEdge_Test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
28779ba
Get geolocation about a given IP address
cegerhardson 23df1d1
Add necessary bits to run test locally, and move to new location.
cegerhardson fc08d73
Add Github Actions to deploy Fastly's Compute@Edge: getGeolocationFor…
cegerhardson 0b966f4
Place deploy-geoip.yaml in the correct location to be triggered
cegerhardson 7224f68
Prepare for testing, and delete old file paths.
cegerhardson e70054b
Add project_directory value
cegerhardson 97c4ec6
Move project_diretory value
cegerhardson f7246fc
Trying to fix path bug.
cegerhardson 5a3506c
Trying again
cegerhardson 37271a3
Just trying
cegerhardson 4473889
Fingers-crossed
cegerhardson 5a97097
Testing for auth
cegerhardson 77ca319
Maybe?
cegerhardson 6f4f8be
Update fastly-compute/geoip/fastly.toml
cegerhardson 84bd996
Update fastly-compute/geoip/fastly.toml
cegerhardson 3cd7cf2
Add Github Actions to deploy Fastly's Compute@Edge: getGeolocationFor…
cegerhardson 1dc6920
Include region in geolocation return values.
cegerhardson 5ec7b1b
Merge branch 'ComputeAtEdge_Test' of https://github.com/python/pypi-i…
cegerhardson 9616015
Add Service ID
cegerhardson 2a83ae9
Add authentication configuration via Fastly's ConfigStore.
cegerhardson 9c5177e
Add necessary file for configuation
cegerhardson 629c057
Update fastly-compute/geoip/.secret.json
ewdurbin 665dd7d
Update README
cegerhardson 44347b6
Update service description
cegerhardson d9f1270
Reconfigure authentication and prettify
cegerhardson f284d67
Update
cegerhardson 262f214
Update references
cegerhardson 9d67bc5
change config store name
cegerhardson bbafc46
get rid of try/catch
cegerhardson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Deploy Compute@Edge GeoIp | ||
on: | ||
push: | ||
# branches: [main] | ||
## Note: by removing the branches value, the workflow will run when a push is made to any branch. This is to serve for testing. | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install project dependencies | ||
run: npm install | ||
working-directory: fastly-compute/geoip | ||
|
||
- name: Deploy to Compute@Edge | ||
uses: fastly/compute-actions@v5 | ||
with: | ||
project_directory: ./fastly-compute/geoip | ||
env: | ||
FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/node_modules | ||
/bin | ||
/pkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"sup3rs3cr3t" : "true" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Get Geolocation Information About a Given IP Address | ||
|
||
This service using [Fastly's Compute@Edge](https://developer.fastly.com/learning/compute/) to get specific geolcation information about a given IP address, and deploys automagically using Github Actions. | ||
|
||
## Getting started | ||
|
||
- Be sure to install [Fastly's CLI](https://developer.fastly.com/learning/tools/cli/) | ||
- As well as the dependencies: `npm install` | ||
|
||
## Try it out locally | ||
|
||
`fastly compute serve --watch` | ||
- This application should now be running on http://localhost:7676 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This file describes a Fastly Compute@Edge package. To learn more visit: | ||
# https://developer.fastly.com/reference/fastly-toml/ | ||
|
||
authors = ["[email protected]"] | ||
description = "geoip" | ||
language = "javascript" | ||
manifest_version = 3 | ||
name = "geoip" | ||
service_id = "CnsNqIdpSj1tZNLTl6PUi4" | ||
|
||
[scripts] | ||
build = "npm run build" | ||
|
||
[local_server] | ||
[local_server.config_stores] | ||
[local_server.config_stores.geoip_auth] | ||
file = ".secret.json" | ||
format = "json" | ||
|
||
ewdurbin marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We likely want to restore this behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed 👍