Releases: google/nginx-sxg-module
Handle certificate chain generation correctly.
Add sxg_fallback_host directive
Now we can manually modify fallback-url
embedded into SXG file with sxg_fallback_host
directive in nginx config file.
Return HTTP 200 OK status for successful SXG.
Embedded fallback URL is now requested URL
Merged #78
An SXG file has a fallback URL to be used when something wrong with the SXG file. But in previous implementation, it is modified to the actual URL and for example an access to https://example.com/
returns SXG embedding https://example.com/index.html
.
It turned out to be an problematic behavior when user expect the fallback URL matches queried URL especially in the context of subresource fetching.
From now, request to https://example.com/
will return SXG with embedding URL https://example.com/
even though the actual contents exists in index.html
.
Configurable life-span of generated SXG
New feature
- Newly appended
sxg_expiry_seconds
directive in nginx configuration, which enables uses to modify the life-span of generated SXG files (referenced asexpires
parameter in the SXG header`).
Configure as location
Configuration
In this release, we normalized on recognizing nginx configuration.
Previously, we cannot use more than one sever
directive in whole nginx configuration, it was a bug.
Now this is improved and adopts multiple server
and location
directives.
You can write sxg
directive both in server
and location
directives, so you can switch ON
or OFF
for multiple location
in nginx configuration.
Notice that you cannot specify sxg_certificate
and other directives in location
, it is only allowed in server
scope, this is because one server should not have multiple SXG certificates (and keys).
This fix is done by @orisano in #66 . Thank you!
Headers
Now nginx-sxg-module will not return Etag
or other upstream header to the user as a outer header. These headers will be packed into inner SXG header.
And it appends X-Content-Type-Options: nosniff
as outer header automatically. This header is required by SXG spec and previously users should append this header via nginx directives. If you already appended the header entry by your hands, the header with this version will become like X-Content-Type-Options: nosniff,nosniff
. This is not harmful but we recommend to remove your appended header.
And other small fixes are applied, enjoy SXG!
Improved stability
- When
preload
header contains full path URL, this module just ignore that. (previously it caused hang up) - Appended mutex to guard the request context against concurrently updated by multiple subresources.
Minor fix
Bug fix
This release includes several important bugfixes.
- Drop
link: </foo>rel="preload"
of failed to fetch subresources. - Defeated some mysterious bugs which stop the module and cause client timeout by correction of handling buffer. (Thanks to @orisano for #38)
- Accept HTTP Link headers with case insensitive (e.g. LiNk: ;rel="preload">. (Thanks to @sisidovski for #41)
- Embed URL parameter into SXG fallback URL (#36).
- Some debug error logs appended only appears when you use it like
error_log path/to/error.log debug
.
Improve error messages.
In this version, nginx-sxg plugin will provide a bit more verbose error messages for failure on starting up.