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

Google Page Speed Api Key Global Variable #81

Closed
franzenzenhofer opened this issue Feb 28, 2019 · 2 comments
Closed

Google Page Speed Api Key Global Variable #81

franzenzenhofer opened this issue Feb 28, 2019 · 2 comments
Assignees
Labels

Comments

@franzenzenhofer
Copy link
Owner

on the settings page there should be a section

Globale Variables

  • Google Page Speed Insights Key: [ ] (input form)
  • Google Mobile Friendly Test Key: [ ] (input form)
  • Rate Limited Domains: [ ] (input form)

these global varialbes should be available in the context of the rules as varialbes

@neuling
Copy link
Collaborator

neuling commented Mar 12, 2019

First implementation is done. Please test if it works for you:

DLvXELwv

Config has a new key called availableGlobalRuleVariables which controls the available global variable inputs and their names.

You can access the global variables/settings inside a rule via this.getGlobals():

const globals = this.getGlobals();
console.log(globals.variables.google_page_speed_insights_key);

@franzenzenhofer
Copy link
Owner Author

works as intended

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants