Re: weight and balancing in upstream proxy

2017-04-13 Thread Frank Liu
Hi Francis, Thanks for confirming that there is no document, and any results observed through testing or reviewing code will not be guaranteed. I guess it is purposely undocumented so that people won't rely on one behavior and we are free to change. Regards, Frank On Thu, Apr 13, 2017 at 4:49 P

Re: Unable to resolve the "Access-Control-Allow-Origin" issue

2017-04-13 Thread Ajay Garg
Hi Richard. You have got me thinking ... https://username:password@1.2.3.4/ works, even without ANY of the "add_header" and "proxy_set_header" directives. So, now the only thing that worries me is security. http://stackoverflow.com/questions/4143196/is-get-data-also-encrypted-in-https indicates

Re: auth_basic and satisfy allowing all traffic

2017-04-13 Thread daveyfx
Hi Francis - In both cases, I get a 404 response, which is to be expected as the default doc root for nginx isn't served on my host. I should expect a 401 on the second curl test, but I get a 404. HTTP/1.1 404 Not Found Server: nginx Date: Fri, 14 Apr 2017 03:44:19 GMT Content-Type: text/html Co

Re: Unable to resolve the "Access-Control-Allow-Origin" issue

2017-04-13 Thread Francis Daly
On Thu, Apr 13, 2017 at 08:20:15PM +0530, Ajay Garg wrote: Hi there, > There has been some progress, but still get a "CORS preflight did not > succeed error". What do the nginx logs say happened? What should the nginx logs say, if everything worked the way you want it to? > Following is receiv

Re: auth_basic and satisfy allowing all traffic

2017-04-13 Thread Francis Daly
On Thu, Apr 13, 2017 at 05:26:35PM -0400, daveyfx wrote: Hi there, > However, if I added the > satisfy/allow/deny directives above, it seems that ALL traffic is allowed in > without prompting for auth. It works for me. Can you provide a complete config that shows the problem you report? What I

Re: weight and balancing in upstream proxy

2017-04-13 Thread Francis Daly
On Wed, Apr 12, 2017 at 02:50:08PM -0700, Frank Liu wrote: Hi there, > How does nginx balances traffic to upstream with different weight? If I > have 3 servers in upstream, with weight 1, 2, 4, assuming all are healthy, > will nginx send traffic to server 1, 2, 3, 2, 3, 3, 3 or 1, 2, 2, 3, 3, 3,

Re: Nginx - API Gateway is not forwarding the request to Auth Service

2017-04-13 Thread Francis Daly
On Thu, Apr 13, 2017 at 01:00:20AM -0400, zaidahmd wrote: Hi there, > > I've read your description, and I confess I'm not sure what benefit > > auth_request within nginx gives you. It looks like your application is > > doing its own auth check on every request anyway, so having nginx do > > the s

Re: weight and balancing in upstream proxy

2017-04-13 Thread Frank Liu
Hi Maxim, Thanks for pointing out the link is not related. Do you have the answer to the original question or a related link? Thanks Frank > On Apr 13, 2017, at 7:34 AM, Maxim Dounin wrote: > > Hello! > >> On Thu, Apr 13, 2017 at 10:09:16AM +0200, B.R. via nginx wrote: >> >> That is an intere

auth_basic and satisfy allowing all traffic

2017-04-13 Thread daveyfx
Hi all - I'm having an issue trying to get auth_basic and satisfy directives working in tandem. If I use auth_basic/auth_basic_user_file on its own, I am prompted for credentials as expected. However, if I added the satisfy/allow/deny directives above, it seems that ALL traffic is allowed in wit

nginScript filesystem access

2017-04-13 Thread Unsay
Hello We'd like to move a rather complicated multilingual website over to nginx. I must determine if we can handle the somewhat involved language based redirects in nginScript middleware (javascript). At one point I must redirect based on whether or not a file exists. In the configuration file I

Re: nginScript and accessing cookies

2017-04-13 Thread Unsay
Okay, I've found the answer to my question. nginScript supports access to all of NGINX's variables. This also provides access to the cookie like so: myfunction(req, res) { var cookie = req.variables.http_cookie; } Kind regards Andreas Posted at Nginx Forum: https://forum.nginx.org/read.php?

Re: Unable to resolve the "Access-Control-Allow-Origin" issue

2017-04-13 Thread Richard Stanway
You're missing the "Authorization" header in your Access-Control-Allow-Headers directive. You can alternatively pass the basic auth in your URI, eg xhr.open("GET", " https://username:password@1.2.3.4/";) rather than crafting it manually. On Thu, Apr 13, 2017 at 4:50 PM, Ajay Garg wrote: > Stran

Re: HTTP/2 on the Upstream

2017-04-13 Thread Igal @ Lucee.org
Maxim, On 4/13/2017 8:07 AM, Maxim Dounin wrote: Note: there is no HTTP/2 push support in nginx as of now. If you indeed see the resources being pushed with the "Link" header, likely you are using cloudflare and this is something Cloudflare does for you. Thank you for clarifying. That did puzz

Re: HTTP/2 on the Upstream

2017-04-13 Thread Maxim Dounin
Hello! On Wed, Apr 12, 2017 at 05:08:53PM -0700, Igal @ Lucee.org wrote: > On 4/12/2017 12:59 PM, Maxim Dounin wrote: > > It's just a matter of providing upstream servers > > with a way to push resources, e.g., via something like the > > X-Accel-Push header or something like this. This doesn't n

Re: Unable to resolve the "Access-Control-Allow-Origin" issue

2017-04-13 Thread Ajay Garg
Strange, but rebooting the machine caused the credentials-popup to be seen again :-| Sorry for the noise here. There has been some progress, but still get a "CORS preflight did not succeed error". Following is what I am doing. a) Following is the server-block in /etc/nginx/conf.d/default.conf ::

Re: weight and balancing in upstream proxy

2017-04-13 Thread Maxim Dounin
Hello! On Thu, Apr 13, 2017 at 10:09:16AM +0200, B.R. via nginx wrote: > That is an interesting questions as intuitively, people could think the > former behavior applies. > > If I got the source code > >

Re: Windows 1024 Connections Limit

2017-04-13 Thread Maxim Dounin
Hello! On Thu, Apr 13, 2017 at 09:54:34AM +0200, B.R. via nginx wrote: > Even though using nginx on Windows goes way over my head (even for > development) and/or seing WIndows as any kind of server, I read that > Windows Vista+ support the poll (well, actually WSAPoll >

Re: Windows 1024 Connections Limit

2017-04-13 Thread Igal @ Lucee.org
Hi, On 4/13/2017 12:54 AM, B.R. via nginx wrote: Even though using nginx on Windows goes way over my head (even for development) and/or seing WIndows as any kind of server, It's very simple - this system was set up many years ago and I was uncomfortable at the time with running Linux -- not wit

Re: Proxying UDP: Preserve proxy port during DTLS handshake

2017-04-13 Thread SebK
Vladimir Homutov Wrote: --- > On Wed, Apr 12, 2017 at 03:53:43PM -0400, SebK wrote: > > Hello everyone, > > Hi Sebastian, > > [...] > > > > So my conclusive question is: Does nginx provide a way to preserve > its > > chosen dynamic port when for

Re: [ Module development - Socket ]

2017-04-13 Thread comput3rz
After reading the source code available in "ngx_mail_auth_http_module.c" trying to figure out how to make a "basic TCP connection" to a backend server, nothing seems clear. I didn't find any simple pattern to read/write on a TCP socket, even if there are simple call like ngx_event_connect_p

Re: Proxying UDP: Preserve proxy port during DTLS handshake

2017-04-13 Thread Vladimir Homutov
On Wed, Apr 12, 2017 at 03:53:43PM -0400, SebK wrote: > Hello everyone, Hi Sebastian, [...] > > So my conclusive question is: Does nginx provide a way to preserve its > chosen dynamic port when forwarding udp packets? > No, currently it is not supported. See also http://mailman.nginx.org/piperma

Re: weight and balancing in upstream proxy

2017-04-13 Thread B.R. via nginx
That is an interesting questions as intuitively, people could think the former behavior applies. If I got the source code right, and as the docs

Re: Windows 1024 Connections Limit

2017-04-13 Thread oscaretu .
Since two days ago Windows Vista is part of the past: http://www.theverge.com/2017/4/11/15241580/microsoft-windows-vista-end-of-support Kind regards, Oscar El El jue, 13 abr 2017 a las 9:55, B.R. via nginx escribió: > Even though using nginx on Windows goes way over my head (even for > develop

Re: Windows 1024 Connections Limit

2017-04-13 Thread B.R. via nginx
Even though using nginx on Windows goes way over my head (even for development) and/or seing WIndows as any kind of server, I read that Windows Vista+ support the poll (well, actually WSAPoll ) system call. Since XP may now rea