Skip to content

Added

  • #482 Added support to serve shlink under a sub path.

    The router.base_path config option can be defined now to set the base path from which shlink is served.

    return [
        'router' => [
            'base_path' => '/foo/bar',
        ],
    ];

    This option will also be available on shlink-installer 1.3.0, so the installer will ask for it. It can also be provided for the docker image as the BASE_PATH env var.

  • #479 Added preliminary support for multiple domains.

    Endpoints and commands which create short URLs support providing the domain now (via query param or CLI flag). If not provided, the short URLs will still be "attached" to the default domain.

    Custom slugs can be created on multiple domains, allowing to share links like https://doma.in/my-compaign and https://example.com/my-campaign, under the same shlink instance.

    When resolving a short URL to redirect end users, the following rules are applied:

    • If the domain used for the request plus the short code/slug are found, the user is redirected to that long URL and the visit is tracked.
    • If the domain is not known but the short code/slug is defined for default domain, the user is redirected there and the visit is tracked.
    • In any other case, no redirection happens and no visit is tracked (if a fall back redirection is configured for not-found URLs, it will still happen).

Changed

  • #486 Updated to shlink-installer v2, which supports asking for base path in which shlink is served.

Deprecated

  • Nothing

Removed

  • #435 Removed translations for error pages. All error pages are in english now.

Fixed

  • Nothing
Assets 3
Pre-release

@acelaya acelaya released this Oct 5, 2019

Beta release with multidomain support
Assets 3

@acelaya acelaya released this Aug 24, 2019

Added

  • Nothing

Changed

  • #450 Added PHP 7.4 to the build matrix, as an allowed-to-fail env.
  • #441 and #443 Split some logic into independent modules.
  • #451 Updated to infection 0.13.
  • #467 Moved docker image config to main Shlink repo.

Deprecated

  • #428 Deprecated preview-generation feature. It will keep working but it will be removed in Shlink v2.0.0

Removed

  • #468 Removed APCu extension from docker image.

Fixed

  • #449 Fixed error when trying to save too big referrers on PostgreSQL.
Assets 3

@acelaya acelaya released this Aug 8, 2019

Added

  • #411 Added new meta property on the ShortUrl REST API model.

    These endpoints are affected and include the new property when suitable:

    • GET /short-urls - List short URLs.
    • GET /short-urls/shorten - Create a short URL (for integrations).
    • GET /short-urls/{shortCode} - Get one short URL.
    • POST /short-urls - Create short URL.

    The property includes the values validSince, validUntil and maxVisits in a single object. All of them are nullable.

    {
      "validSince": "2016-01-01T00:00:00+02:00",
      "validUntil": null,
      "maxVisits": 100
    }
  • #285 Visit location resolution is now done asynchronously but in real time thanks to swoole task management.

    Now, when a short URL is visited, a task is enqueued to locate it. The user is immediately redirected to the long URL, and in the background, the visit is located, making stats to be available a couple of seconds after the visit without the requirement of cronjobs being run constantly.

    Sadly, this feature is not enabled when serving shlink via apache/nginx, where you should still rely on cronjobs.

  • #384 Improved how remote IP addresses are detected.

    This new set of headers is now also inspected looking for the IP address:

    • CF-Connecting-IP
    • True-Client-IP
    • X-Real-IP
  • #440 Created db:create command, which improves how the shlink database is created, with these benefits:

    • It sets up a lock which prevents the command to be run concurrently.
    • It checks of the database does not exist, and creates it in that case.
    • It checks if the database tables already exist, exiting gracefully in that case.
  • #442 Created db:migrate command, which improves doctrine's migrations command by generating a lock, preventing it to be run concurrently.

Changed

Deprecated

  • Nothing

Removed

  • Nothing

Fixed

  • #416 Fixed error thrown when trying to locate visits after the GeoLite2 DB is downloaded for the first time.
  • #424 Updated wkhtmltoimage to version 0.12.5
  • #427 and #434 Fixed shlink being unusable after a database error on swoole contexts.
Assets 3

@acelaya acelaya released this May 13, 2019

Added

  • #377 Updated visit:locate command (formerly visit:process) to automatically update the GeoLite2 database if it is too old or it does not exist.

    This simplifies processing visits in a container-based infrastructure, since a fresh container is capable of getting an updated version of the file by itself.

    It also removes the need of asynchronously and programmatically updating the file, which deprecates the visit:update-db command.

  • #373 Added support for a simplified config. Specially useful to use with the docker container.

Changed

  • #56 Simplified supported cache, requiring APCu always.

Deprecated

  • #406 Deprecated PUT /short-urls/{shortCode} REST endpoint in favor of PATCH /short-urls/{shortCode}.

Removed

  • #385 Dropped support for PHP 7.1
  • #379 Removed copyright from error templates.

Fixed

  • Nothing
Assets 3

@acelaya acelaya released this Mar 30, 2019

Added

  • Nothing

Changed

  • #153 Updated to doctrine/migrations version 2.0.0
  • #376 Allowed visit:update-db command to not return an error exit code even if download fails, by passing the -i flag.
  • #341 Improved database tests so that they are executed against all supported database engines.

Deprecated

  • Nothing

Removed

  • Nothing

Fixed

  • #382 Fixed existing short URLs not properly checked when providing the findIfExists flag.
Assets 3

@acelaya acelaya released this Mar 5, 2019

Added

  • Nothing

Changed

  • Nothing

Deprecated

  • Nothing

Removed

  • Nothing

Fixed

  • #368 Fixed error produced when running a SELECT COUNT(...) with ORDER BY in PostgreSQL databases.
Assets 3

@acelaya acelaya released this Feb 26, 2019

Added

  • Nothing

Changed

  • #363 Updated to shlinkio/php-coding-standard version 1.1.0

Deprecated

  • Nothing

Removed

  • Nothing

Fixed

  • #362 Fixed all visits without an IP address being processed every time the visit:process command is executed.
Assets 3

@acelaya acelaya released this Feb 23, 2019

Added

  • #304 Added health endpoint to check healthiness of the service. Useful in container-based infrastructures.

    Call [GET /rest/health] in order to get a response like this:

    HTTP/1.1 200 OK
    Content-Type: application/health+json
    Content-Length: 681
    
    {
      "status": "pass",
      "version": "1.16.0",
      "links": {
        "about": "https://shlink.io",
        "project": "https://github.com/shlinkio/shlink"
      }
    }

    The status code can be 200 OK in case of success or 503 Service Unavailable in case of error, while the status property will be one of pass or fail, as defined in the Health check RFC.

  • #279 Added new findIfExists flag to the [POST /short-url] REST endpoint and the short-urls:generate CLI command. It can be used to return existing short URLs when found, instead of creating new ones.

    Thanks to this flag you won't need to remember if you created a short URL for a long one. It will just create it if needed or return the existing one if possible.

    The behavior might be a little bit counterintuitive when combined with other params. This is how the endpoint behaves when providing this new flag:

    • Only the long URL is provided: It will return the newest match or create a new short URL if none is found.
    • Long url and custom slug are provided: It will return the short URL when both params match, return an error when the slug is in use for another long URL, or create a new short URL otherwise.
    • Any of the above but including other params (tags, validSince, validUntil, maxVisits): It will behave the same as the previous two cases, but it will try to exactly match existing results using all the params. If any of them does not match, it will try to create a new short URL.
  • #336 Added an API test suite which performs API calls to an actual instance of the web service.

Changed

  • #342 The installer no longer asks for a charset to be provided, and instead, it shuffles the base62 charset.
  • #320 Replaced query builder by plain DQL for all queries which do not need to be dynamically generated.
  • #330 No longer allow failures on PHP 7.3 envs during project CI build.
  • #335 Renamed functional test suite to database test suite, since that better describes what it actually does.
  • #346 Extracted installer as an independent tool.
  • #261 Increased mutation score to 70%.

Deprecated

  • #351 Deprecated config:generate-charset and config:generate-secret CLI commands.

Removed

  • Nothing

Fixed

  • #317 Fixed error while trying to generate previews because of global config file being deleted by mistake by build script.
  • #307 Fixed memory leak while trying to process huge amounts of visits due to the query not being properly paginated.
Assets 3

@acelaya acelaya released this Dec 16, 2018

Added

  • #162 Added non-rest endpoints to swagger definition.

Changed

  • #312 Now all config files both in php and json format are loaded from config/params folder, easing users to provided customizations to docker image.
  • #226 Updated how table are rendered in CLI commands, making use of new features in Symfony 4.2.
  • #321 Extracted entities mappings from entities to external config files.
  • #308 Automated docker image building.

Deprecated

  • Nothing

Removed

Fixed

  • #309 Added missing favicon to prevent 404 errors logged when an error page is loaded in a browser.
  • #310 Fixed execution context not being properly detected, making CloseDbConnectionMiddlware to be always piped. Now the check is not even made, which simplifies everything.
Assets 3
You can’t perform that action at this time.