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

Hard-coded GeocodeEarth API key #283

Open
tungleduyxyz opened this issue Nov 15, 2021 · 3 comments
Open

Hard-coded GeocodeEarth API key #283

tungleduyxyz opened this issue Nov 15, 2021 · 3 comments

Comments

@tungleduyxyz
Copy link

Hi, I see this key is hard-coded not sure why, can anyone give me some advice to change this key in the docker file

var API_KEY = 'ge-5673e2c135b93a30';

@missinglink
Copy link
Member

Hi @tungleduyxyz, the host is also hardcoded here

url: 'https://api.geocode.earth/v1',
and the Jawg key we were donated for demos.

I guess we didn't really foresee the need to make this configurable, the original goal was to have a demo link available on the github repo:

Screenshot 2021-11-15 at 17 20 25

What would you like to do? Link to your own instance of pelias/interpolation?

@orangejulius
Copy link
Member

Yeah, maybe we can set up some very basic templating for the demo page. The code to serve it is here, it's just a static page rendered by Express:

interpolation/cmd/server.js

Lines 215 to 216 in 3564ca9

// serve the demo app
app.use('/demo', express.static('demo'));

The API key that's currently hardcoded was once used across all our demos and the Pelias Compare app. However, due to abuse we have to periodically rotate that key. It didn't help that the same key was used by anyone and everyone setting up their own Interpolation service and using the demo locally.

It would be nice if we could provide a default demo key that was specific to the interpolation service, but also let people override it. We at Geocode Earth would likely use that to ensure the API key used by our own instance of the demo that Peter mentioned was always working.

@tungleduyxyz
Copy link
Author

Yes, it makes sense @orangejulius. For the current version, I need to build the demo myself because the key doesn't work. So, it will be better if I can register in GeocodeEarth, get the free trial key, and see how it work in the demo.

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

No branches or pull requests

3 participants