I am developing an application using Nuxtjs. The application is opening when I try to access the URL 127.0.0.1. However, when I open the application using the URL localhost:5000 then Access to localhost was denied You don't have the authorization to view this page. HTTP ERROR 403.
Previously it was working but not sure what happened now its not working.
Providing the answer as it can be useful to someone else in the future:
I was facing the issue in macOS Monterey this is because macOS Monterey introduced AirPlay Receiver running on port 5000. This prevents your web server from serving on port 5000. The receiver already has the port.
The solution is to turn off the AirPlay Receiver by following steps:
Go to System Preferences → Sharing → Untick Airplay Receiver.