Content
@
https://warpcast.com/~/channel/frames-devs
0 reply
0 recast
0 reaction
Colin
@colin
What's the best way to determine, *on the server side*, if a user is viewing a page within a frame v2? Client side solutions won't work for us given that we heavily rely on RSCs. User agent contains Warpcast/462? cc @deodad
1 reply
0 recast
13 reactions
Tony D’Addeo
@deodad
there currently isn't a blessed way have considered a special header that any farcaster client hosting a frame should set. it'd be cheap to add so if you'd use it happy to set this up.
1 reply
0 recast
5 reactions
Colin
@colin
I would definitely use this. We are planning to ship v2 frames to render existing Paragraph publication/post pages, and would love to differentiate which server components to render. Eg we can update our subscribe button component: "If user is viewing this within a frame, render a FarcasterSubscribe button instead of our regular EmailSubscribe button"
2 replies
0 recast
2 reactions
Tony D’Addeo
@deodad
makes sense, let me add
0 reply
0 recast
1 reaction
Tony D’Addeo
@deodad
I thought this would be trivial but it's not on web as you can't easily set custom headers when loading an iframe one option is to use a query parameter, slightly uglier but so far I haven't been able to think of any significant downsides. let me mull this over for a bit
1 reply
0 recast
0 reaction