Author Archives: Mark Reyes

About Mark Reyes

Web Developer based out of Southern California.

What’s an Object in JavaScript?

Almost everything is an object.

  • Primitives: numbers, booleans, strings, null, undefined
  • Objects: Math, Date, JSON, window, document, objects you create, array, function, numbers, booleans, strings

Functions are “first class” values.

  • Assign a function to a variable.
  • Store a function as a value in an array or object.
  • Pass a function to a function.
  • Return a function from a function.

Primitives don’t look like objects.


var phoneNumber = "555-1212";	//phoneNumber is a primitive.
console.log(phoneNumber.length);//Now we need phoneNumber to be an object.
/*********************
*	BEHIND THE SCENES
*
*	phoneNumber is converted to a string object.
*	.length property is then accessed
*	
**********************/	
console.log(phoneNumber);		//phoneNumber is a primitive again.

Apply a Rewrite Directive to a Solr Instance

After exposing the Solr endpoint with a reverse proxy, it’s important to note that it also exposes the Solr admin panel to the end-user. This is not desired.

Flowchart of a RewriteRule directive that rests on website.com’s httpd.conf file.

Flowchart of a RewriteRule directive that rests on website.com’s httpd.conf file.

Problem:

  • Solr’s admin panel becomes exposed from the reverse proxy.

Solutions:


RewriteRule ^/solr/$ / [R=301,L,DPI]