This repository was archived by the owner on Jun 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -213,16 +213,15 @@ export const onNotebookEventReceived = (
213
213
* Domain matcher; we check that the message we recieved is indeed coming from a Glue Studio notebook; if it's not we drop it
214
214
* do an early return.
215
215
*/
216
- // NOTE: To be added back
217
- // const domainMatcher =
218
- // /^(https:\/\/)(.*\.)?(console\.amazonaws\.cn|console\.aws\.amazon\.com|console\.amazonaws-us-gov\.com|.*notebookauthproxy\.gluestudio\.a2z\.org\.cn|.*notebookauthproxy\.gluestudio\.aws\.dev)(\/.*)?$/;
219
-
220
- // if (!domainMatcher.test(origin)) {
221
- // fetch(
222
- // `${origin}${jupyterConfigData.baseUrl}api/contents?unauthorizedOrigin&origin=${message.origin}`
223
- // );
224
- // return;
225
- // }
216
+ const domainMatcher =
217
+ / ^ ( h t t p s : \/ \/ ) ( .* \. ) ? ( c o n s o l e \. a m a z o n a w s \. c n | c o n s o l e \. a w s \. a m a z o n \. c o m | c o n s o l e \. a m a z o n a w s - u s - g o v \. c o m | .* n o t e b o o k a u t h p r o x y \. g l u e s t u d i o \. a 2 z \. o r g \. c n | .* n o t e b o o k a u t h p r o x y \. g l u e s t u d i o \. a w s \. d e v ) ( \/ .* ) ? $ / ;
218
+
219
+ if ( ! domainMatcher . test ( origin ) ) {
220
+ fetch (
221
+ `${ origin } ${ jupyterConfigData . baseUrl } api/contents?unauthorizedOrigin&origin=${ message . origin } `
222
+ ) ;
223
+ return ;
224
+ }
226
225
227
226
switch ( type ) {
228
227
/**
Original file line number Diff line number Diff line change @@ -57,8 +57,7 @@ const activate = (
57
57
58
58
// Ensuring extension loads in an iframe within the AWS console context; otherwise do early return
59
59
if ( window . location === window . parent . location ) {
60
- // NOTE: Te be enabled
61
- // body.innerHTML = '';
60
+ body . innerHTML = '' ;
62
61
return ;
63
62
}
64
63
You can’t perform that action at this time.
0 commit comments