Nginx change request_uri in order to proxy redirect to the right url

I want to be able to redirect several requests to different containers running in the same machine. To do this im trying to use nginx. Conf file im using at the moment.

server{         listen 80;         location /foo{                 proxy_pass "";                 proxy_set_header X-Real-IP $  remote_addr;                 proxy_set_header X-Forwarded-For   $  proxy_add_x_forwarded_for;         }           location /bar{                 proxy_pass "";                 proxy_set_header X-Real-IP $  remote_addr;                 proxy_set_header X-Forwarded-For   $  proxy_add_x_forwarded_for;         } } 

My problem is that the /foo and /bar are just like tags in order to know to which container to redirect. By doing this way the /foo and /bar are being sent as a $ request_uri that will result in an error. I want to filter them or change them to / alone.

I tried some rewrites but it seems im not getting lucky.

JavaFX Right Code Organization [on hold]

So I have this school project where I had to develop a board game. This project had two phases: the first one, wich implemented a text interface, and the second one, with a graphic interface. I’m having a hard time finding the right way to organize the code. Is there some generic way to do it? PS: I have to implement the Observer interface Thanks guys!

WooCommerce – display product price in the right currency

With the help of another post here I was able to use this code to display my product’s price using a shortcode:

function wc_price_by_id_shortcode( $  atts ) {     $  atts = shortcode_atts( array( 'id' => null, ), $  atts, 'bartag' );      if( intval( $  atts['id'] ) > 0 && function_exists( 'wc_get_product' ) ){          $  _product = wc_get_product( $  atts['id'] );          $  price = wc_price( $  _product->get_price() );       }    return $  price;  }  add_shortcode( 'product_price', 'wc_price_by_id_shortcode' );  

This is great but I am using three different currency variations, USD, GBP and EUR. For some reason this shortcode outputs only the EUR. How might I get it to output the price/currency based on the user’s zone as defined in the plugin?

Thanks in advance.

What is the right design for UI apps backed by Cloud services like AWS

I am looking for some general architectural guidance about designing good cloud apps, primarily using AWS. For the sake of argument, lets say it’s a single page app, written in JS, hitting a couple of services like S3 and maybe some Lambda functions that read/write to a DynamoDB.

Option 1 – Make calls directly using AWS SDK So, this seems to be how the documentation is written. Your app would auth the user using Cognito, exchange for the tokens, then connect to the services directly.

Benefits here: Code is in the UI, so less moving parts. Cognito seems geared towards this type of dev…otherwise your server parts would have to cache the tokens or you’d somehow have to pass them around from the client. It also seems like less cost since you wouldn’t be paying for an “intermediary” service to bounce calls off of.

Cons: Well, your code is all in the UI, making your UI bloated. It feels like too much business logic would be in the client, which feels wrong.

Option 2 – Intermediary services Basically you would write some service, be it a Lambda function or an EC2 microservice or the like, to “bounce” the calls off of.

Benefits here: Well, you would have some additional level of control. Also, these intermediaries could house most, if not all, of the business logic.

Cons: Well, the biggest one is cost as you would now have to host a bunch of extra “things” to service your calls. Also, for the most part, it would seem like most of your intermediary services would be pass-through, so where is the benefit?

Add item to Right click Drag and Drop contextual menu on Windows

I need to add items to the contextual menu when I drag and drop a file using the right click.

I can manage to add item in registry for just right click on the file, but not when dragging to another folde.

This is what I'm using just for the right click and works fine. [HKEY_CLASSES_ROOT\*\shell\TrimResizePicture] @="Players/Pictures Trim Resize to *x1500" "Icon"="C:\cmd_Scripts\photo2.ico,0" [HKEY_CLASSES_ROOT\*\shell\TrimResizePicture\command] @="\"C:\cmd_Scripts\resize_trim_picture.bat\" \"%1\""  This is what I've tried for drag and drop right click, and is not working. [HKEY_CLASSES_ROOT\*\shellex\DragDropHandlers\TrimResizePicture] @="Players/Pictures Trim Resize to *x1500" "Icon"="C:\cmd_Scripts\photo2.ico,0" [HKEY_CLASSES_ROOT\*\shellex\DragDropHandlers\TrimResizePicture\command] @="\"C:\cmd_Scripts\resize_trim_picture.bat\" \"%1\"" 


EU right when flight delayed so much that return is missed


If I am traveling for business, I may take a flight to e.g. Frankfurt just for a 2 hour meeting, and then immediately return. I would like to know what EU regulations stipulate if the outbound flight is delayed so much that I could not make the return.

I have seen one other question related to what the airline probably will do, but I would like a statement about EU regulations.

For instance, is the airline required to refund the whole ticket price? Presumably, if I see that I cannot make the meeting, it doesn’t make sense for me to travel at all. So I would simply not travel. Or is the airline perhaps only obligated to make sure that I get to the destination and back? For instance, in this case, perhaps the airline just has to get me a new ticket which says that I fly to Frankfurt, and immediately return on the same plane?

I understand that if my original flight is delayed due to non-weather related events, and I miss my connection, then the airline is generally responsible to get me to my destination. Furthermore, I understand that the EU has regulations laying out what should happen if a delay is longer than X minutes. But it is unclear to me what should happen if the delay interferes with the return flight (not just the connection).