Created
October 28, 2021 08:22
-
-
Save AnishDe12020/a7e057827df225c9d8d470f7e05ffb39 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {NextResponse} from "next/server" | |
const middleware = (req, ev) => { | |
const os = req.ua.os.name | |
return NextResponse.rewrite(`/${os}`) | |
}; | |
export default middleware; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment