People with doors want this project done.
— My new favorite euphemism for management
And Other Bad Words
People with doors want this project done.
— My new favorite euphemism for management
I’m attempting to set up an HTTP server in NiFi to accept uploads and process them on-demand. This gets tricky because I want to submit the files using an existing web application that will not be served from NiFi, which leads to trouble with XSS (Cross-Site Scripting) and setting up CORS (Cross Origin Resource Sharing [1]).
The trouble starts with just trying to PUT or POST a simple file. The error in Firefox reads:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource (Reason: CORS header 'Access-Control-Allow-Origin' missing).
You can serve up the Javascript that actually performs the upload from NiFi and side-step XSS, but you may still run into trouble with CORS. You’ll have trouble even if NiFi and your other web server live on the same host (using different ports, of course), as they’re considered different hosts for the purposes of XSS prevention.

To make this work, you’ll need to enable specific headers in the HandleHttpResponse processor. Neither the need to set some headers, nor the headers that need to be set, are documented by NiFi at this time (so far as I can tell).
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: PUT, POST, GET, OPTIONS
Access-Control-Allow-Headers: Accept, Accept-Encoding, Accept-Language, Connection, Content-Length, Content-Type, DNT, Host, Referer, User-Agent, Origin, X-Forwarded-ForYou may want to review the value for Access-Control-Allow-Origin, as the wildcard may allow access to unexpected hosts. If your server is public-facing (why would you do that with NiFi?) then you certainly don’t want a wildcard here. The wildcard makes configuration much simpler if NiFi is strictly interior-facing, though.
The specific values to set for Access-Control-Allow-Methods depend on what you’re doing. You’ll probably need OPTIONS for most cases. I’m serving up static files so I need GET, and I’m receiving uploads that may or may not be chunked, so I need POST and PUT.
The actual headers needed for Access-Control-Allow-Headers is a bit variable. A wildcard is not an acceptable value here, so you’ll have to list every header you need separately — and there are a bunch of possible headers. See [3] for an explanation and a fairly comprehensive list of possible headers. Our list contains a small subset that covers our basic test cases; your mileage may vary.
You may also want to set up a RouteOnAttribute processor to ignore OPTIONS requests (${http.method:equals('OPTIONS')}), otherwise you might see a bunch of zero-byte files in your flow.
References:
[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
[3] http://stackoverflow.com/questions/13146892/cors-access-control-allow-headers-wildcard-being-ignored
Weird Al Yankovic was a big part of Meghan’s and my childhood, and pretty much anyone in our generation. You could say he’s a hero of sorts. When I found out, quite by accident, that his latest tour had dates near us I bought tickets the same day. The only decision was which venue.
I chose the Lowell Summer Music Series; as Meghan said, if it rains we would be able to say that not only have we seen Weird Al live, but we saw him in a high school gymnasium. (The high school next door is the rain location.) It’s outdoors and BYOBlanket; so long as it didn’t rain and move indoors the kids are free.
So, on the appointed date and earliest possible time after work (which was earlier today, as I write this) we packed up the kids and a blanket and headed to the park to stake out a spot.

The show was flawless. It was small enough to be fun, large enough to let the crowd’s energy really flow, and turned-down enough that I wasn’t deaf at the end. Alpha and Beta spent most of the show in a corner of the park with some other kids, but they enjoyed the show immensely as well. Their view was better than ours, despite the distance — they could see over the crowd, while we had to contend with the sound booth/tent.

There was a good mix of old and new songs over a couple of hours, interspersed with video clips while the band changed costumes. Among other songs (in no particular order), there was Tacky (the opening number), Dare to Be Stupid, the aforementioned Fat, Amish Paradise, White and Nerdy, an awesome arrangement of Like A Surgeon set to the “unplugged” arrangement of Eric Clapton’s Layla (really), a couple of polkas interspersed throughout (of course), and closing with Yoda.

The girls were buzzing as we left the park, and wide awake despite a) being 10 pm, b) after a regular day of school, and c) on the first week of school. They can sleep in tomorrow, there’s no school, and Meghan and I aren’t setting an alarm — our jobs are flexible enough that we can afford to be a little late.
Butter did not have a good day today. She’s been licking her paws and scratching her face to the point she’s starting to lose fur. Sprayed her with some anti-itch spray, and that didn’t help much (but she did put herself in her crate for an hour).

Off to the vet we go. He looks her over and says yes, it’s allergies, benadryl what she needs, and by the way her anal glands are full.
So, poor Butter is itchy, has been sprayed with nasty stuff, went to the vet, had a finger up her rear to express her gland, and is due to take two pills later.
I said I should just trim her nails to make it complete, but Quinn says that would be too cruel. I think he’s right.
We’ll just let her sleep for now.
There’s a small, boring backstory: Meghan renewed our membership with the Museum of Science (MOS), then asked me if we should renew it (she asked me via text, so she may have a different order of events). I said we shouldn’t, since the girls haven’t been interested in going and we basically did not go at all last year — HOWEVER if we were to actually go just once I would be happy to renew while we were on-site. Despite talking about this all over text, Meghan’s disappointment was evident as she dutifully cancelled the renewal.
I considered my options carefully, as the couch isn’t a particularly comfortable place to sleep, and gently reminded her that the MOS has an observatory that they open on Friday nights to view the stars — therefore it would be open later that night, and I would happily renew while we were there. All we had to do was get the kids on board with going, or figure out what they would do while the two of us went. (The girls thought this was a cool idea. 50 points to Gryffindor.)

A few hours later we found ourselves standing on the roof of the MOS parking garage, waiting for our turn at the telescope. Sadly, I could not photograph the view from the telescope, but it was a surprisingly clear view of Saturn. A number of other people have taken photographs that are pretty similar to what we saw. Happily the docent was informative and happy to answer questions, and didn’t make us feel rushed. The MOS seems to have crowd management around the telescope down pat.
While we were waiting our turns, we took a few other pictures of Boston and astronomical phenomena, and watched the city bustle around us.

This is probably the only political statement I’ll make on the internet this year, and it’s not telling you who to vote for or pushing a particular issue in your face. I want to introduce some perspective.
Everyone is worried about the presidential election this year — will it be Trump or Clinton, I can’t vote for him and I don’t like her, if X is elected it will be a disaster for the country, what about these very fine 3rd party candidates, etc. You’re all barking up the wrong tree, you’ve forgotten how the government really works, and that the occupant of the oval office has limited powers and doesn’t really matter. What matters is the Senate, and we should be talking about senatorial candidates.
The president doesn’t install justices on the Supreme Court, judges on the Court of Appeals, or more than 6000 people onto various agencies, and the president doesn’t decide who sits in their own cabinet. The president may nominate people for these positions, but the Senate confirms those appointments. If the Senate doesn’t consent to a nominee, that nominee will not be appointed. These appointments have lasting effects long after a presidential term is up so the appointment really matters, but the field of unappointed nominees are irrelevant.
What about the House of Representatives? Their districts are fairly gerrymandered so individual representatives aren’t all that responsive to national politics, and the House’s power is somewhat limited by design. They do play a role in budgeting and legislation, though — along with the Senate.
The president doesn’t set the federal budget, Congress does. The president does proposes a budget (and only does so because Congress can’t be bothered — by law they are supposed to make it and they can always change anything proposed by the president) but the budget is voted on and set by Congress.
You may object that “my senators are fine, and they’re not even up for election this year!” This may be true, but it’s not a good objection. We all have friends and family in other states, you can discuss the issues and candidates across the nation, and persuade them to take an interest and vote. (But never brow-beat or fight, please, that’s neither respectful or respectable.)
So in this election cycle, lets talk about the things that matter. The president isn’t one of them.

Baba took the whole clan to Fenway to see the Red Sox play the Chicago White Sox. It was an afternoon game so that the kids could come, too.
Baba generously bought us stadium food as well – no small sum for hot dogs, pretzels, pizza, and Del’s Lemonade.
The Sox stunk until the bottom of the 5th inning, at which point they came back from 4-0 lead by the White Sox to win 7-8.
Delta fell asleep by the 8th inning, which is surprising given the amount of noise every time the Sox got a run. Kappa, who’s about a year and a half, stayed awake and in mostly good spirits through the entire game. Beta was well behaved, and Alpha genuinely enjoyed herself.
We left as the 10th inning was starting so that we could avoid some of the crowds with the kids and headed down the street to get dinner at Wahlburgers.
First they came for the verbs, and I said nothing because verbing weirds language. Then they arrival for the nouns, and I speech nothing because I no verbs.
Source: http://www.bash.org/?954654