Next.js Discord

Discord Forum

what is the substitute for middlware for static export?

Unanswered
Ruddy Ground-Dove posted this in #help-forum
Open in Discord
Ruddy Ground-DoveOP
our prod env switched to static export where middleware is not supported. is there a substitute for this?

5 Replies

No, unfortunately.
Unless your hosting provider has some native systems to support running a script whenever a request arrives
@joulev Unless your hosting provider has some native systems to support running a script whenever a request arrives
Ruddy Ground-DoveOP
our devops uses aws, do you think its possible with aws?
@Ruddy Ground-Dove our devops uses aws, do you think its possible with aws?
I don’t use it so I don’t know, sorry. Though for aws, you can actually deploy whole nextjs (not just static export) to aws lambda with sst. It’s not easy but it’s doable.