-
-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
161 changed files
with
4,777 additions
and
676 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.idea | ||
build | ||
composer.lock | ||
vendor/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ branches: | |
php: | ||
- 5.6 | ||
- 7 | ||
- hhvm | ||
- 7.1 | ||
|
||
before_script: | ||
- composer self-update | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
# url-shortener | ||
# Shlink | ||
|
||
[![Build Status](https://travis-ci.org/shlinkio/shlink.svg?branch=master)](https://travis-ci.org/shlinkio/shlink) | ||
[![Code Coverage](https://scrutinizer-ci.com/g/shlinkio/shlink/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/shlinkio/shlink/?branch=master) | ||
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/shlinkio/shlink/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/shlinkio/shlink/?branch=master) | ||
[![Latest Stable Version](https://poser.pugx.org/shlinkio/shlink/v/stable.png)](https://packagist.org/packages/shlinkio/shlink) | ||
[![License](https://poser.pugx.org/shlinkio/shlink/license.png)](https://packagist.org/packages/shlinkio/shlink) | ||
|
||
A PHP-based URL shortener application with analytics and management |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
use Shlinkio\Shlink\Common\ErrorHandler\ContentBasedErrorHandler; | ||
use Zend\Expressive; | ||
use Zend\Expressive\Container; | ||
use Zend\Expressive\Router; | ||
use Zend\Expressive\Template; | ||
use Zend\Expressive\Twig; | ||
use Zend\ServiceManager\Factory\InvokableFactory; | ||
|
||
return [ | ||
|
||
'dependencies' => [ | ||
'factories' => [ | ||
Expressive\Application::class => Container\ApplicationFactory::class, | ||
Router\FastRouteRouter::class => InvokableFactory::class, | ||
Template\TemplateRendererInterface::class => Twig\TwigRendererFactory::class, | ||
], | ||
'aliases' => [ | ||
Router\RouterInterface::class => Router\FastRouteRouter::class, | ||
'Zend\Expressive\FinalHandler' => ContentBasedErrorHandler::class, | ||
], | ||
], | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,21 @@ | ||
<?php | ||
use Acelaya\UrlShortener\Middleware; | ||
use Zend\Expressive\Container\ApplicationFactory; | ||
use Zend\Expressive\Helper; | ||
|
||
return [ | ||
|
||
'middleware_pipeline' => [ | ||
'always' => [ | ||
'middleware' => [ | ||
Helper\ServerUrlMiddleware::class, | ||
], | ||
'priority' => 10000, | ||
], | ||
|
||
'routing' => [ | ||
'middleware' => [ | ||
ApplicationFactory::ROUTING_MIDDLEWARE, | ||
], | ||
'priority' => 10, | ||
], | ||
|
||
'rest' => [ | ||
'path' => '/rest', | ||
'middleware' => [ | ||
Middleware\CheckAuthenticationMiddleware::class, | ||
Middleware\CrossDomainMiddleware::class, | ||
], | ||
'priority' => 5, | ||
], | ||
|
||
'post-routing' => [ | ||
'middleware' => [ | ||
Helper\UrlHelperMiddleware::class, | ||
ApplicationFactory::DISPATCH_MIDDLEWARE, | ||
], | ||
'priority' => 1, | ||
], | ||
|
||
'error' => [ | ||
'middleware' => [], | ||
'error' => true, | ||
'priority' => -10000, | ||
], | ||
], | ||
]; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
return [ | ||
|
||
'translator' => [ | ||
'locale' => env('DEFAULT_LOCALE', 'en'), | ||
], | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
<?php | ||
use Shlinkio\Shlink\Core\Service\UrlShortener; | ||
|
||
return [ | ||
|
||
'url_shortener' => [ | ||
'domain' => [ | ||
'schema' => getenv('SHORTENED_URL_SCHEMA') ?: 'http', | ||
'hostname' => getenv('SHORTENED_URL_HOSTNAME'), | ||
'schema' => env('SHORTENED_URL_SCHEMA', 'http'), | ||
'hostname' => env('SHORTENED_URL_HOSTNAME'), | ||
], | ||
'shortcode_chars' => getenv('SHORTCODE_CHARS'), | ||
'shortcode_chars' => env('SHORTCODE_CHARS', UrlShortener::DEFAULT_CHARS), | ||
], | ||
|
||
]; |
Oops, something went wrong.