Giter Club home page Giter Club logo

cogworks.sitelock's Introduction

Cogworks.SiteLock

NuGet release GitHub release (by tag) Our Umbraco project page

A security package for Umbraco. Lock down an Umbraco website from viewers. Only users who are logged into the backoffice can see the public website.


Getting started

This package is supported on:

  • Umbraco 7.1.2+ with package version 1.x.x
  • Umbraco 8+ with package version 2.x.x

Installation

SiteLock is available from Our Umbraco, NuGet, or as a manual download directly from GitHub.

Our Umbraco repository

You can find a downloadable package, along with a discussion forum for this package, on the Our Umbraco site.

NuGet package repository

To install from NuGet, run the following command in your instance of Visual Studio.

PM> Install-Package Cogworks.SiteLock

How it works

SiteLock is simply a module which is loaded dymically at runtime. It inspects the domain of each request, and then either allows it, or throws a HttpException with a status code of 403.

Usage

After installing the package, you'll be able to lock any website via /config/SiteLock.config.

Locked Domains

This section of the configuration specifies specific domains to be locked in the Umbraco instance.

Example:

<lockedDomains>
    <domain>localhost</domain>
    <domain>staging.sitelock.local</domain>
</lockedDomains>

To lock all domains, simply use *. Example:

<lockedDomains>
    <domain>*</domain>
</lockedDomains>

Allowed Paths

This section of the configuration allows you to specify paths which can be allowed.

Example:

<allowedPaths>
	<path>^/news(.*)</path>
	<path>/403.html</path>
</allowedPaths>

Important

Note that the paths are actually regular expressions. So in the example above, we allow paths which "start with" /news/.

Allowed IPs

This section of the configuration allows you to specify IPs which can be allowed.

Example:

<allowedIps>
	<ip>127.0.0.1</ip>
</allowedIps>

Changes to /config/SiteLock.config will require an application restart, as the config file cached at startup.

Integration

SiteLock was designed to be simple for developers. Just install via nuget or the Umbraco backoffice. Configure /config/SiteLock.config and you're good to go.


Contribution guidelines

To raise a new bug, create an issue on the GitHub repository. To fix a bug or add new features, fork the repository and send a pull request with your changes. Feel free to add ideas to the repository's issues list if you would to discuss anything related to the package.

Who do I talk to?

This project is maintained by Cogworks and contributors. If you have any questions about the project please contact us through the forum on Our Umbraco, on Twitter, or by raising an issue on GitHub.


License

Copyright © 2017 The Cogworks Ltd, and other contributors

Licensed under the MIT License.

cogworks.sitelock's People

Contributors

anthonycogworks avatar ja0b avatar dependabot[bot] avatar mzajkowski avatar samgooch avatar aochmann avatar sekmenhuseyin avatar jeavon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.