cloudflare / nginx-google-oauth

Lua module to add Google OAuth to nginx
https://blog.cloudflare.com/
MIT License
429 stars 100 forks source link

Provide a default value for ngo_callback_host #19

Closed maxnaude closed 7 years ago

maxnaude commented 7 years ago

The documentation says:

$ngo_callback_host The host for the callback, defaults to first entry in the server_name list

This PR provides the default after I found the following in Nginx error log (having not set $ngo_callback_host in config):

runtime error: /etc/nginx/lua/nginx-google-oauth/access.lua:18: attempt to concatenate local 'cb_server_name' (a nil value)

bobrik commented 7 years ago

Thanks!