I have a headless Magento2 instance i.e magento serves as backend for an IOS app , So i want to disable access to frontend website and keep the access to REST APIs . I am using ngnix and magento 2.2.3 community .

I was going to implement a plugin to frontcontoller action to redirect to some external , is this the best way to do it ?


Yes, "plugin to frontcontoller action to redirect to some external" is best solution .

In future,if you require then you can access your frontend also.

This is simplest and efficient process to prevent the frontend to access.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.