mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-29 02:26:14 -05:00
Maybe setup captcha site keys properly?
This commit is contained in:
parent
9d4d2f3c67
commit
d2cb0818c8
3 changed files with 9 additions and 2 deletions
|
@ -33,6 +33,11 @@ env:
|
||||||
- CLOUDDATA_HOST_VAR=CLOUDDATA_HOST_$TRAVIS_BRANCH
|
- CLOUDDATA_HOST_VAR=CLOUDDATA_HOST_$TRAVIS_BRANCH
|
||||||
- CLOUDDATA_HOST=${!CLOUDDATA_HOST_VAR}
|
- CLOUDDATA_HOST=${!CLOUDDATA_HOST_VAR}
|
||||||
- CLOUDDATA_HOST=${CLOUDDATA_HOST:-$CLOUDDATA_HOST_STAGING}
|
- CLOUDDATA_HOST=${CLOUDDATA_HOST:-$CLOUDDATA_HOST_STAGING}
|
||||||
|
- RECAPTCHA_SITE_KEY_master=6LeRbUwUAAAAAFYhKgk3G9OKWqE_OJ7Z-7VTUCbl
|
||||||
|
- RECAPTCHA_SITE_KEY_STAGING=6LfukK4UAAAAAFR44yoZMhv8fj6xh-PMiIxwryG3
|
||||||
|
- RECAPTCHA_SITE=RECAPTCHA_SITE_KEY_$TRAVIS_BRANCH
|
||||||
|
- RECAPTCHA_SITE_KEY=${!RECAPTCHA_SITE_KEY_VAR}
|
||||||
|
- RECAPTCHA_SITE_KEY=${RECAPTCHA_SITE_KEY:-$RECAPTCHA_SITE_KEY_STAGING}
|
||||||
- ROOT_URL_master=https://scratch.mit.edu
|
- ROOT_URL_master=https://scratch.mit.edu
|
||||||
- ROOT_URL_STAGING=https://scratch.ly
|
- ROOT_URL_STAGING=https://scratch.ly
|
||||||
- ROOT_URL_VAR=ROOT_URL_$TRAVIS_BRANCH
|
- ROOT_URL_VAR=ROOT_URL_$TRAVIS_BRANCH
|
||||||
|
|
|
@ -40,7 +40,7 @@ class EmailStep extends React.Component {
|
||||||
this.widgetId = this.grecaptcha.render(this.captchaRef,
|
this.widgetId = this.grecaptcha.render(this.captchaRef,
|
||||||
{
|
{
|
||||||
callback: this.captchaSolved,
|
callback: this.captchaSolved,
|
||||||
sitekey: ''
|
sitekey: process.env.RECAPTCHA_SITE_KEY
|
||||||
},
|
},
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ class EmailStep extends React.Component {
|
||||||
<div
|
<div
|
||||||
className="g-recaptcha"
|
className="g-recaptcha"
|
||||||
data-badge="bottomright"
|
data-badge="bottomright"
|
||||||
data-sitekey=""
|
data-sitekey={process.env.RECAPTCHA_SITE_KEY}
|
||||||
data-size="invisible"
|
data-size="invisible"
|
||||||
ref={this.setCaptchaRef}
|
ref={this.setCaptchaRef}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -173,6 +173,8 @@ module.exports = {
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env.NODE_ENV': '"' + (process.env.NODE_ENV || 'development') + '"',
|
'process.env.NODE_ENV': '"' + (process.env.NODE_ENV || 'development') + '"',
|
||||||
'process.env.API_HOST': '"' + (process.env.API_HOST || 'https://api.scratch.mit.edu') + '"',
|
'process.env.API_HOST': '"' + (process.env.API_HOST || 'https://api.scratch.mit.edu') + '"',
|
||||||
|
'process.env.RECAPTCHA_SITE_KEY': '"' +
|
||||||
|
(process.env.RECAPTCHA_SITE_KEY || '6Lf6kK4UAAAAABKTyvdSqgcSVASEnMrCquiAkjVW') + '"',
|
||||||
'process.env.ASSET_HOST': '"' + (process.env.ASSET_HOST || 'https://assets.scratch.mit.edu') + '"',
|
'process.env.ASSET_HOST': '"' + (process.env.ASSET_HOST || 'https://assets.scratch.mit.edu') + '"',
|
||||||
'process.env.BACKPACK_HOST': '"' + (process.env.BACKPACK_HOST || 'https://backpack.scratch.mit.edu') + '"',
|
'process.env.BACKPACK_HOST': '"' + (process.env.BACKPACK_HOST || 'https://backpack.scratch.mit.edu') + '"',
|
||||||
'process.env.CLOUDDATA_HOST': '"' + (process.env.CLOUDDATA_HOST || 'clouddata.scratch.mit.edu') + '"',
|
'process.env.CLOUDDATA_HOST': '"' + (process.env.CLOUDDATA_HOST || 'clouddata.scratch.mit.edu') + '"',
|
||||||
|
|
Loading…
Reference in a new issue