geocodeearth / autocomplete-element

A custom element for use with the Geocode Earth Autocomplete API.
https://geocode.earth
MIT License
8 stars 1 forks source link

sitewide api_key #9

Closed missinglink closed 3 years ago

missinglink commented 3 years ago

In the case where the component is rolled out widely across a medium/large website, the HTML code may exist in multiple views across the codebase.

Changing the API key in this scenario becomes a bit of a chore.

Would it be possible to define the api_key parameter once per installation and then omit the api_key attribute when embedding the component?

mxlje commented 3 years ago

I think we should keep this in mind for a future release but not have it at launch.

missinglink commented 3 years ago

As discussed today, the immediate solution for this is to use the includes/templates/dynamic code generation tooling available from the web framework to have a single place in the codebase which can implement defaults and be a single place to make global changes.