Download the PHP package solar-investments/support without Composer
On this page you can find all versions of the php package solar-investments/support. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download solar-investments/support
More information about solar-investments/support
Files in solar-investments/support
Package support
Short Description Support package for Solar Investments
License MIT
Informations about the package support
Solar Investments Support
Support package for Solar Investments projects.
- Installation
- Middleware
- Enable Secure Pagination Links
- Hide From Robots On Origin
- Lower Path Casing
- Remove Trailing Slash
- Require VPN
- Set Fastly Surrogate Key
- URLs
-
Testing Traits
Installation
Middleware
You can register any of the following middleware:
SolarInvestments\Middleware\EnableSecurePaginationLinks
SolarInvestments\Middleware\HideFromRobotsOnOrigin
SolarInvestments\Middleware\LowerPathCasing
SolarInvestments\Middleware\RemoveTrailingSlash
SolarInvestments\Middleware\RequireVpn
SolarInvestments\Middleware\SetFastlySurrogateKey
Enable Secure Pagination Links
This middleware fixes an issue where the next
and prev
links in the pagination response are generated using http
instead of https
.
Hide From Robots On Origin
This middleware adds the X-Robots-Tag
header to the response with the value none
(same as noindex, nofollow
) to prevent search engines from indexing the page. This is only done when the site is accessed directly on the origin server, e.g. http://origin.example.com
instead of http://www.example.com
.
Lower Path Casing
If Statamic is installed, control panel paths are not converted to lowercase.
This middleware converts the path of the request to lowercase.
Remove Trailing Slash
This middleware removes the trailing slash from the path of the request.
Require VPN
This middleware restricts access to the application to specific IP addresses. This is useful when you want to restrict access to the application to only users on a VPN (or anywhere really).
To use the RequireVpn
middleware, publish the configuration file:
By default, this middleware is "disabled" and all IP addresses are allowed.
To restrict access from specific IP addresses, set the VPN_IP_ADDRESSES
environment variable in your .env
file, e.g.:
Alternatively, you can specify the IP addresses in the config/vpn.php
file.
Set Fastly Surrogate Key
This middleware adds the Surrogate-Key
header to the response with the configured value, allowing you to purge the cache for specific pages.
To use the SetFastlySurrogateKey
middleware, publish the configuration file:
Then, set the surrogate_keys
in the config/fastly.php
file, e.g.:
URLs
The UrlServiceProvider
does the following when the application is not running locally:
- Forces the
https
scheme for all URLs generated by Laravel. - Forces the root URL to whatever is set for the
APP_URL
environment variable.
Testing Traits
SkipTestWhenRunningCI
This trait can be used to skip tests when running in a CI environment.