Open BrodaNoel opened 1 year ago
If you have a Vercel URL if you want to reproduce it: https://nofilter-landing-ssr-git-canary-1-april-2023-brodanoel.vercel.app/
Nextjs config file there is:
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
async redirects() {
return [
{
source: '/ios',
destination:
'https://apps.apple.com/app/nofilter-photo-spots/id1445583976',
basePath: false,
permanent: false,
},
{
source: '/android',
destination:
'https://play.google.com/store/apps/details?id=app.no_filter.nofilter',
basePath: false,
permanent: false,
},
{
source: '/login-with-openid',
destination: 'nofilter://login-with-openid',
basePath: false,
permanent: false,
},
];
},
};
module.exports = nextConfig;
I believe i am experiencing the same issue here. I hope this thread will get a response. Any workarounds?
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue
https://codesandbox.io/p/sandbox/lingering-resonance-en9626
To Reproduce
Describe the Bug
In
next.config.js
redirects
are not working when they are app schemas. Example:If you open the codesandbox, and click on the link, it will navigate to a page that should REDIRECT to
nofilter://
.nofilter
is an app. If you have getnofilter.com app installed, you will see it doesn't open because thelocation
http header is wrong in the request.Something is weird: In my prod version (using
"next": "13.1.6",
), thelocation
http header is:nofilter:/login-with-openid
(there is 1 slash missing), but incanary
isnofilter:login-with-openid
(there are 2 slashes missing).^^^ Check in the bottom, the
location
http header. That's the one how isnofilter:/
in13.1.6
andnofilter:
incanary
Expected Behavior
The redirection should go to the proper one defined in the configurations (with double slash), as in:
nofilter://login-with-openid
Which browser are you using? (if relevant)
Safari in the phone (where it will be used)
How are you deploying your application? (if relevant)
Push to the repo who Vercel is listening changes