सामुग्रीवर जा
WordPress.org

मराठी

  • थीम
  • प्लगइन
  • बातम्या
  • मद्दत
  • वर्डप्रेस बद्दल
  • मराठी कार्यसंघ
  • संपर्क करा
  • वर्डप्रेस मिळवा
वर्डप्रेस मिळवा
WordPress.org

Plugin Directory

Headless Login Guard

  • प्लगइन सादर करा
  • माझे आवडते
  • लॉग इन
  • प्लगइन सादर करा
  • माझे आवडते
  • लॉग इन

Headless Login Guard

Andrew Wilkinson कडून
डाउनलोड करा
  • तपशील
  • पुनरावलोकने
  • इंस्टॉलेशन
  • डेव्हलोपमेंट
समर्थन

वर्णन

A lightweight plugin that forces login for backend access in a headless WordPress setup. Keeps your WordPress dashboard private while allowing your front end (e.g. Astro, Next.js) to pull content via GraphQL/REST.

What it does

  • Requires authentication for /wp-admin/ and other backend pages
  • Always allows the login page to avoid redirect loops
  • Leaves key endpoints open for headless use:
    • /wp-json/ (REST API)
    • /graphql (WPGraphQL)
    • /wp-admin/admin-ajax.php (AJAX)
    • /wp-cron.php (cron)
    • /robots.txt
    • /sitemap*.xml (sitemaps and indexes)
    • /wp-content/uploads/* (media)
    • /favicon.ico
    • /newrelic (New Relic monitoring)
  • Logged-in users visiting the backend root get redirected to the dashboard
  • Works with Bedrock layouts (handles root path vs /wp/)

Use case

  • WordPress is the content backend
  • Public site is built with Astro/Next.js/etc
  • Editors log in to WordPress. Visitors never see the backend
  • Front end builds and live pages can still query GraphQL/REST without authentication

Customization

Developers can customize allowed endpoints using the force_login_allowed_patterns filter:

add_filter('force_login_allowed_patterns', function($patterns) {
    $patterns[] = '#^/healthz$#';           // custom health check
    $patterns[] = '#^/status$#';            // uptime checks
    $patterns[] = '#^/wp-json/acf/v3/.*#';  // specific REST namespace
    return $patterns;
});

स्थापना

  1. Upload the plugin files to the /wp-content/plugins/force-login directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. The plugin will automatically start protecting your backend – no configuration needed!

नेहमी विचारले जाणारे प्रश्न

I’m locked out! How do I access my site?

Visit /wp-login.php directly to sign in. The plugin always allows access to the login page.

My front-end requests are failing. What should I do?

Verify the endpoint is on the allow list. Check the plugin description for the default allowed patterns, or use the force_login_allowed_patterns filter to add custom endpoints.

Does this work with Bedrock?

Yes! The plugin correctly handles both standard WordPress installs and Bedrock layouts where the site URL and home URL may differ.

Can I add custom endpoints?

Yes, use the force_login_allowed_patterns filter to add your own regex patterns for additional endpoints that should remain public.

समीक्षा

ह्या प्लगइनसाठी कोणतेही समीक्षण नाही.

योगदानकर्ते आणि विकसक

“Headless Login Guard” हे मुक्त स्रोत सॉफ्टवेअर आहे. पुढील लोक या प्लगइनच्या निर्मितीत योगदान केले आहे.

योगदानकर्ते
  • Andrew Wilkinson

भाषांतर करा “Headless Login Guard” तुमच्या भाषेत.

विकासातील आग्रह?

कोड ब्राउझ करा, SVN संग्रहालय तपासा, किंवा विकास लॉग च्या RSS द्वारे सदस्यता घ्या.

बदलांची यादी

1.0.1

  • Added: New Relic monitoring endpoint allowlist pattern (/newrelic) to support APM monitoring
  • Added: WordPress.org plugin directory compatibility
  • Added: Proper plugin structure with activation/deactivation hooks
  • Added: Filter hook for customizing allowed patterns
  • Improved: Code organization and documentation

1.0.0

  • Initial release
  • Restricts backend (/wp-admin/) to authenticated users
  • Allows GraphQL and REST API endpoints for headless front-ends
  • Basic whitelist of essential endpoints (cron, ajax, robots.txt, sitemaps, uploads)

मेटा

  • आवृत्ती 1.0.1
  • शेवटचा अद्यतन 2 महिने पूर्वी
  • सक्रिय स्थापना 10 पेक्षा कमी
  • वर्डप्रेस आवृत्ती 6.0 किंवा मोठा
  • परीक्षित केले आहे 6.9.4
  • PHP आवृत्ती 8.1 किंवा मोठा
  • भाषा
    English (US)
  • टॅग्ज:
    GraphQLheadlessloginrest-apisecurity
  • प्रगत दृश्य

मूल्यांकन

अजून कोणतीही पुनरावलोकने सबमिट केलेली नाहीत.

Your review

सर्व पुनरावलोकने पहा

योगदानकर्ते

  • Andrew Wilkinson

समर्थन

काहीतरी सांगायचं आहे का? मदतीची आवश्यकता आहे का?

समर्थन फोरम पहा

  • बद्दल
  • बातम्या
  • होस्टिंग
  • गोपनीयता
  • शोकेस
  • थीम्स
  • प्लगिन्स
  • पॅटर्नस्
  • शिका
  • सहाय्य
  • विकासक
  • WordPress.tv ↗
  • सहभागी व्हा
  • कार्यक्रम
  • दान करा ↗
  • भविष्यासाठी पाच
  • WordPress.com ↗
  • मॅट ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

मराठी

  • आमच्या X (एक्स) (पूर्वीचे ट्विटर) खात्याला भेट द्या
  • आमच्या ब्लूस्की खात्याला भेट द्या.
  • आमच्या Mastodon खात्याला भेट द्या.
  • आमच्या थ्रेड्स खात्याला भेट द्या.
  • आमच्या फेसबुक पेजला भेट द्या
  • आमच्या इंस्टाग्राम खात्याला भेट द्या
  • आमच्या लिंक्डइन खात्याला भेट द्या
  • आमच्या टिकटॉक अकाउंटला भेट द्या.
  • आमच्या यूट्यूब चॅनेलला भेट द्या
  • आमच्या टंबलर खात्याला भेट द्या.
कोड कविता आहे
The WordPress® trademark is the intellectual property of the WordPress Foundation.