Open lwfcatch opened 2 years ago
The nginx.Parser
does not support fields or contexts in the format of Lua Scripts
currently. You can consider first to separate Lua Scripts
into script files and set a parser.Key
for it. The sample configuration is as follows:
...
location /test/ {
set_by_lua_block_file ../block.lua;
...
At present, I am reconstructing the Heimdallr-reborn
project. After completion, I will consider allowing Bifrost
to support custom format fields or contexts such as Lua Scripts
; Or if you have a better solution, you are welcome to submit a PR.
panic: runtime error: index out of range [-1]
goroutine 1 [running]: github.com/ClessLi/bifrost/pkg/resolv/V2/nginx/loader.(loader).loadFromConfigPosition(0xc000023040, 0x41a1fab, 0x23, 0x0, 0x0, 0x0, 0x0) /Users/catch/go/src/github.com/ClessLi/bifrost/pkg/resolv/V2/nginx/loader/loader.go:249 +0xd45 github.com/ClessLi/bifrost/pkg/resolv/V2/nginx/loader.(loader).LoadFromFilePath(0xc000023040, 0x41a1fab, 0x23, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /Users/catch/go/src/github.com/ClessLi/bifrost/pkg/resolv/V2/nginx/loader/loader.go:43 +0x32f github.com/ClessLi/bifrost/pkg/resolv/V2/nginx/configuration.NewConfigurationFromPath(0x41a1fab, 0x23, 0xc000117f78, 0x400b465, 0xc000070058, 0x0) /Users/catch/go/src/github.com/ClessLi/bifrost/pkg/resolv/V2/nginx/configuration/configuration.go:292 +0x92 main.main() /Users/catch/Documents/code/deliver/go/plugin.go:119 +0x3a