# Disabling the preflight script when the explorer is embedded - is it possible?

**URL:** <https://community.apollographql.com/t/disabling-the-preflight-script-when-the-explorer-is-embedded-is-it-possible/9334>\
**Category:** GraphOS\
**Tags:** studio, graphos, explorer\
**Created:** [August 4, 2025, 9:59am UTC](https://community.apollographql.com/t/disabling-the-preflight-script-when-the-explorer-is-embedded-is-it-possible/9334 "2025-08-04T09:59:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ana\_Andrei](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/ana_andrei/32/6296_2.png) [@Ana\_Andrei](https://community.apollographql.com/u/Ana_Andrei)\
**Post date:** [August 4, 2025, 9:59am UTC](https://community.apollographql.com/t/disabling-the-preflight-script-when-the-explorer-is-embedded-is-it-possible/9334/1 "2025-08-04T09:59:49Z")

</div>

Hello,

In summary, we need a way to deactivate a preflight script set in the studio when the Apollo Explorer is used in embedded form in an Angular app (@apollo/explorer/src/EmbeddedExplorer). This script is responsible for getting the SSO authorisation token that will be passed to the request as a header. The script is not needed/causing issues when the explorer is used embedded.\*

More details:

For one of our Angular apps, we need to use the embedded version of the explorer - the app has its own SSO login system to get the token, which we just pass to the embedded explorer using a handleRequest header. This makes the preflight script redundant in this scenario & also a blocker due to some errors it causes/dialogs it opens.

I’ve been looking into ways to automatically disable the preflight script when it’s being used as embedded. Here are the approaches that didn’t work:

- setting an env variable and then checking its value inside the script - did not manage to set an env variable from the embedded explorer, I think it’s only possible to do it directly from the studio

- sending a custom header from the embedded explorer, but this also doesn’t work as the preflight script doesn’t seem to interact with the requests like that (at least I didn’t manage to make this work, I get undefined on what I tried)

- checking with window.top/window.parent, this doesn’t work as the script is not running inside the browser

Is there anything else I can try? Thanks!
