File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
flags-sdk/experimentation-statsig Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -38,16 +38,17 @@ export async function middleware(request: NextRequest) {
38
38
// Create a new request with the modified headers
39
39
const modifiedRequest = new Request ( nextUrl , { ...request , headers } )
40
40
41
- const [ statsig , statsigUser ] = await Promise . all ( [
41
+ const [ statsig , statsigUser , response ] = await Promise . all ( [
42
42
statsigAdapter . initialize ( ) ,
43
43
identify ( ) ,
44
+ fetch ( modifiedRequest ) ,
44
45
] )
46
+
45
47
const clientInitializeResponse = statsig . getClientInitializeResponse (
46
48
statsigUser ,
47
49
{ hash : 'djb2' }
48
50
)
49
51
50
- const response = await fetch ( modifiedRequest )
51
52
const rewriter = new HTMLRewriter ( )
52
53
rewriter . on ( 'script#embed' , {
53
54
element ( element ) {
You can’t perform that action at this time.
0 commit comments