Skip to content

Commit

Permalink
feat: always use latest apollo sandbox (#2686)
Browse files Browse the repository at this point in the history
* feat: removeDuplicateTags() validates tags and panic with meaningful error message

* Instead of pinning on _latest without subresource integrity check, update both url and integrity to latest

* Update graphql/playground/apollo_sandbox_playground.go

---------

Co-authored-by: kerry <kerry@oscer.ai>
Co-authored-by: Steve Coffman <StevenACoffman@users.noreply.github.com>
  • Loading branch information
3 people committed Jun 22, 2023
1 parent 3b295bb commit abc3c62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graphql/playground/apollo_sandbox_playground.go
Expand Up @@ -24,7 +24,7 @@ var apolloSandboxPage = template.Must(template.New("ApolloSandbox").Parse(`<!doc
<body>
<div style="width: 100vw; height: 100vh;" id='embedded-sandbox'></div>
<!-- NOTE: New version available at https://embeddable-sandbox.cdn.apollographql.com/ -->
<script rel="preload" as="script" crossorigin="anonymous" integrity="{{.mainSRI}}" type="text/javascript" src="https://embeddable-sandbox.cdn.apollographql.com/58165cf7452dbad480c7cb85e7acba085b3bac1d/embeddable-sandbox.umd.production.min.js"></script>
<script rel="preload" as="script" crossorigin="anonymous" integrity="{{.mainSRI}}" type="text/javascript" src="https://embeddable-sandbox.cdn.apollographql.com/7212121cad97028b007e974956dc951ce89d683c/embeddable-sandbox.umd.production.min.js"></script>
<script>
{{- if .endpointIsAbsolute}}
const url = {{.endpoint}};
Expand Down Expand Up @@ -53,7 +53,7 @@ func ApolloSandboxHandler(title, endpoint string) http.HandlerFunc {
"title": title,
"endpoint": endpoint,
"endpointIsAbsolute": endpointHasScheme(endpoint),
"mainSRI": "sha256-/E4VNgAWFmbNLyXACSYoqsDAj68jC1sCMSQ0cDjf4YM=",
"mainSRI": "sha256-/ldbSJ7EovavF815TfCN50qKB9AMvzskb9xiG71bmg2I=",
})
if err != nil {
panic(err)
Expand Down

0 comments on commit abc3c62

Please sign in to comment.