mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-06 04:42:56 +02:00
config: add warning about http URLs (#2358)
This commit is contained in:
parent
a9ba3ffff5
commit
ca8205f0b4
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
@ -17,6 +18,7 @@ import (
|
||||||
|
|
||||||
"github.com/pomerium/pomerium/internal/hashutil"
|
"github.com/pomerium/pomerium/internal/hashutil"
|
||||||
"github.com/pomerium/pomerium/internal/identity"
|
"github.com/pomerium/pomerium/internal/identity"
|
||||||
|
"github.com/pomerium/pomerium/internal/log"
|
||||||
"github.com/pomerium/pomerium/internal/urlutil"
|
"github.com/pomerium/pomerium/internal/urlutil"
|
||||||
"github.com/pomerium/pomerium/pkg/cryptutil"
|
"github.com/pomerium/pomerium/pkg/cryptutil"
|
||||||
configpb "github.com/pomerium/pomerium/pkg/grpc/config"
|
configpb "github.com/pomerium/pomerium/pkg/grpc/config"
|
||||||
|
@ -400,6 +402,10 @@ func (p *Policy) Validate() error {
|
||||||
return fmt.Errorf("config: policy source url (%s) contains a path, but it should be set using the path field instead",
|
return fmt.Errorf("config: policy source url (%s) contains a path, but it should be set using the path field instead",
|
||||||
source.String())
|
source.String())
|
||||||
}
|
}
|
||||||
|
if source.Scheme == "http" {
|
||||||
|
log.Warn(context.Background()).Msgf("config: policy source url (%s) uses HTTP but only HTTPS is supported",
|
||||||
|
source.String())
|
||||||
|
}
|
||||||
|
|
||||||
p.Source = &StringURL{source}
|
p.Source = &StringURL{source}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue