Open SamuelMarks opened 1 year ago
you should make it surrounded by http{} block
@mingmingshiliyu Yes but these are include
d; so should not be surrounded so.
I use your case like nginx.conf
http{
server {
# My comment here
server_name domain.name;
listen 443;
location /api0 {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:5000/awesome;
proxy_redirect off;
}
}
}
and parse it into json style ,it`s obviously workable.
And I`m doubt about using gonginx or go-crossplane to parse configuration,maybe not only nginx.conf in the future,Do you have any advices?
@mingmingshiliyu Sure but include
is very useful, and in a dynamic environment I might want to reload
nginx and include/exclude different server
blocks. Being able to convert to JSON, modify the JSON, then emit the new server
block is required functionality for my use-case.
And my use-case seems pretty common.
@mingmingshiliyu Sure but
include
is very useful, and in a dynamic environment I might want toreload
nginx and include/exclude differentserver
blocks. Being able to convert to JSON, modify the JSON, then emit the newserver
block is required functionality for my use-case.And my use-case seems pretty common.
oh, it happened! agree with you
@aluttik Bump
With your basic
crossplane.Parse
example in your README, this errors:In the meantime I'll just: