Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions internal/watcher/instance/nginx_config_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,14 @@ func (ncp *NginxConfigParser) Parse(ctx context.Context, instance *mpi.Instance)
"instance_id", instance.GetInstanceMeta().GetInstanceId(),
)

lua := crossplane.Lua{}
payload, err := crossplane.Parse(configPath,
&crossplane.ParseOptions{
SingleFile: false,
StopParsingOnError: true,
LexOptions: crossplane.LexOptions{
Lexers: []crossplane.RegisterLexer{lua.RegisterLexer()},
},
},
)
if err != nil {
Expand Down
9 changes: 9 additions & 0 deletions test/config/nginx/nginx-with-multiple-access-logs.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ http {
"\treqtime:$request_time"
"\tapptime:$upstream_response_time";

server {
listen 9093;
server_name lua.example.com;

ssl_certificate_by_lua_block {
print("Test lua block")
}
}

server {
access_log %s ltsv;

Expand Down