访问自己本地的网站,会出现强制跳转HTTPS的问题,首先看自己的代码,确定非代码问题, 非 SPRING 引起
非APACHE 配置443的原因。
经查是因为
增加: Header set "Strict-Transport-Security" "maxage=0;includeSubDomains"
Description: | Configure HTTP request headers |
---|---|
Syntax: | RequestHeader set|append|merge|add|unset|edit header [value] [replacement] [early|env=[!]variable] |
Context: | server config, virtual host, directory, .htaccess |
Override: | FileInfo |
Status: | Extension |
Module: | mod_headers |
Compatibility: | The merge argument is available in version 2.2.9 and later. The edit argument is available in version 2.2.4 and later. |
This directive can replace, merge, change or remove HTTP request headers. The header is modified just before the content handler is run, allowing incoming headers to be modified. The action it performs is determined by the first argument. This can be one of the following values:
set
append
merge
add
set
,
append
or
merge
should be used instead.
unset
edit
This argument is followed by a header name, which can include the final colon, but it is not required. Case is ignored. For set
, append
, merge
and add
a value is given as the third argument. If a value contains spaces, it should be surrounded by double quotes. For unset
, no value should be given. value may be a character string, a string containing format specifiers or a combination of both. The supported format specifiers are the same as for the Header
, please have a look there for details. Foredit
both a value and a replacement are required, and are a regular expression and a replacement string respectively.
The RequestHeader
directive may be followed by an additional argument, which may be used to specify conditions under which the action will be taken, or may be the keyword early
to specify early processing. If the environment variable specified in the env=...
argument exists (or if the environment variable does not exist andenv=!...
is specified) then the action specified by the RequestHeader
directive will take effect. Otherwise, the directive will have no effect on the request.
Except in early mode, the RequestHeader
directive is processed just before the request is run by its handler in the fixup phase. This should allow headers generated by the browser, or by Apache input filters to be overridden or modified.
Description: | Configure HTTP request headers |
---|---|
Syntax: | RequestHeader set|append|merge|add|unset|edit header [value] [replacement] [early|env=[!]variable] |
Context: | server config, virtual host, directory, .htaccess |
Override: | FileInfo |
Status: | Extension |
Module: | mod_headers |
Compatibility: | The merge argument is available in version 2.2.9 and later. The edit argument is available in version 2.2.4 and later. |
This directive can replace, merge, change or remove HTTP request headers. The header is modified just before the content handler is run, allowing incoming headers to be modified. The action it performs is determined by the first argument. This can be one of the following values:
set
append
merge
add
set
,
append
or
merge
should be used instead.
unset
edit
This argument is followed by a header name, which can include the final colon, but it is not required. Case is ignored. For set
, append
, merge
and add
a value is given as the third argument. If a value contains spaces, it should be surrounded by double quotes. For unset
, no value should be given. value may be a character string, a string containing format specifiers or a combination of both. The supported format specifiers are the same as for the Header
, please have a look there for details. Foredit
both a value and a replacement are required, and are a regular expression and a replacement string respectively.
The RequestHeader
directive may be followed by an additional argument, which may be used to specify conditions under which the action will be taken, or may be the keyword early
to specify early processing. If the environment variable specified in the env=...
argument exists (or if the environment variable does not exist andenv=!...
is specified) then the action specified by the RequestHeader
directive will take effect. Otherwise, the directive will have no effect on the request.
Except in early mode, the RequestHeader
directive is processed just before the request is run by its handler in the fixup phase. This should allow headers generated by the browser, or by Apache input filters to be overridden or modified.