aluttik / go-crossplane

An unofficial Go port of the NGINX config/JSON converter crossplane
Apache License 2.0
50 stars 15 forks source link

Add very basic handling of access_by_lua_block #15

Open pugmajere opened 1 year ago

pugmajere commented 1 year ago

This detects access_by_lua_block and consumes the block, rather than attempting to do anything more interesting with it. (Other *_by_lua_block directives could be handled similarly, but aren't covered in this change.)

It should be possible to preserve the block in some fashion in the future. The main goal of this change is to fix the parsing so directives after a lua block are not treated as being inside the lua block.

The "}" was getting picked up during "args" processing and not triggering an exit from Parse().

pugmajere commented 1 year ago

I don't feel like this fixes https://github.com/aluttik/go-crossplane/issues/1 but it does somewhat reduce the friction, I think.