Skip to content

Commit

Permalink
Merge pull request #1 from thecogworks/master
Browse files Browse the repository at this point in the history
Update fork
  • Loading branch information
samgooch authored Oct 2, 2020
2 parents 063a205 + f174e89 commit 7dbc6f4
Show file tree
Hide file tree
Showing 13 changed files with 1,798 additions and 194 deletions.
31 changes: 26 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,43 @@
[![NuGet release](https://img.shields.io/nuget/v/Cogworks.SiteLock.svg)](https://www.nuget.org/packages/Cogworks.SiteLock)
[![Our Umbraco project page](https://img.shields.io/badge/our-umbraco-orange.svg)](https://our.umbraco.org/projects/website-utilities/sitelock/)

A security package for Umbraco 7. Lock down an Umbraco website from viewers. Only users who are logged into the backoffice can see the public website.
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.
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](https://our.umbraco.org/projects/website-utilities/sitelock/) site.

#### NuGet package repository

To [install from NuGet](https://www.nuget.org/packages/Cogworks.SiteLock/), 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:
Expand All @@ -46,6 +59,7 @@ Example:
~~~

### Allowed Paths

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

Example:
Expand All @@ -57,10 +71,12 @@ Example:
~~~

#### 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:
Expand All @@ -70,21 +86,26 @@ Example:
</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

### 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](http://www.thecogworks.com/) and contributors. If you have any questions about the project please contact us through the forum on Our Umbraco, on [Twitter](https://twitter.com/cogworks), or by raising an issue on GitHub.

---

## License

Copyright &copy; 2017 [The Cogworks Ltd](http://www.thecogworks.com/), and other contributors

Licensed under the MIT License.
Loading

0 comments on commit 7dbc6f4

Please sign in to comment.