-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(android): use expo-platform
over user-agent
#46
base: main
Are you sure you want to change the base?
Conversation
expo-platform
over user-agent
expo-platform
over user-agent
@natew could you verify if that works in your setup? my is still breaking because of some strange |
Breaking on android? I think we patch just one of the files, does android have a specific platform file? That's one thing we need to get better support of in general. |
Hm, yea - after applying patch properly, Rollup doesn't give the error. But
it will pick |
packages/vxrn/src/create.ts
Outdated
@@ -529,12 +529,18 @@ export const create = async (optionsIn: VXRNConfig) => { | |||
// TODO move these to router.get(): | |||
app.use( | |||
defineEventHandler(async ({ node: { req } }) => { | |||
if (!req.headers['user-agent']?.match(/Expo|React/)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw wont this break now for RN vanilla? we may need both or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, because bare RN at beginning makes request to:
→ /status
→ /index.bundle
so this change won't affect it
6372fd0
to
95fd88a
Compare
For some reason on Android
user-agent
doesn't containReact
orExpo
keyword.