File tree Expand file tree Collapse file tree 2 files changed +21
-17
lines changed Expand file tree Collapse file tree 2 files changed +21
-17
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ if (get('metrics.enabled')) {
29
29
next ( ) ;
30
30
} ) ;
31
31
32
+ app . disable ( 'x-powered-by' ) ;
33
+
32
34
app . get (
33
35
'/balancer/metrics' ,
34
36
basicAuth ( get ( 'metrics.basicAuth.username' ) , get ( 'metrics.basicAuth.password' ) ) ,
Original file line number Diff line number Diff line change @@ -46,23 +46,25 @@ export const JoinPage = injectIntl(({ intl }) => {
46
46
const { formatMessage } = intl ;
47
47
48
48
async function sendJoinRequest ( ) {
49
- try {
50
- const hmacvalue = cryptoJS
51
- . HmacSHA256 ( `${ teamname } ` , 'hardcodedkey' )
52
- . toString ( cryptoJS . enc . Hex ) ;
53
- const { data } = await axios . post ( `/balancer/teams/${ teamname } /join` , {
54
- passcode,
55
- hmacvalue,
56
- } ) ;
57
- navigate ( `/teams/${ teamname } /joined/` , { state : { passcode : data . passcode } } ) ;
58
- } catch ( error ) {
59
- if (
60
- error . response . status === 401 &&
61
- error . response . data . message === 'Team requires authentication to join'
62
- ) {
63
- navigate ( `/teams/${ teamname } /joining/` ) ;
64
- } else {
65
- setFailed ( true ) ;
49
+ if ( window . confirm ( 'Are you ready?' ) ) {
50
+ try {
51
+ const hmacvalue = cryptoJS
52
+ . HmacSHA256 ( `${ teamname } ` , 'hardcodedkey' )
53
+ . toString ( cryptoJS . enc . Hex ) ;
54
+ const { data } = await axios . post ( `/balancer/teams/${ teamname } /join` , {
55
+ passcode,
56
+ hmacvalue,
57
+ } ) ;
58
+ navigate ( `/teams/${ teamname } /joined/` , { state : { passcode : data . passcode } } ) ;
59
+ } catch ( error ) {
60
+ if (
61
+ error . response . status === 401 &&
62
+ error . response . data . message === 'Team requires authentication to join'
63
+ ) {
64
+ navigate ( `/teams/${ teamname } /joining/` ) ;
65
+ } else {
66
+ setFailed ( true ) ;
67
+ }
66
68
}
67
69
}
68
70
}
You can’t perform that action at this time.
0 commit comments