-
Notifications
You must be signed in to change notification settings - Fork 0
/
c489934f91c237b335518335364bfd58
771 lines (624 loc) · 48.9 KB
/
c489934f91c237b335518335364bfd58
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://assets-cdn.github.com">
<link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars2.githubusercontent.com">
<link rel="dns-prefetch" href="https://avatars3.githubusercontent.com">
<link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
<link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/frameworks-1c2c316b7a17f15536c6a26ed744654fc228a24658a7ae395cdcbf8329c8406b.css" media="all" rel="stylesheet" />
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github-a83d0dd1d52f7ad052dfbc843bfb6d4f76108df4328e23a5f4d9350124a3952b.css" media="all" rel="stylesheet" />
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/site-44b6bba3881278f33c221b6526379b55fbd098af3e553f54e81cab4c9a517c8e.css" media="all" rel="stylesheet" />
<meta name="viewport" content="width=device-width">
<title>browsersync setup for proxying a remote site · GitHub</title>
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
<link rel="fluid-icon" href="https://gist.github.com/fluidicon.png" title="GitHub">
<meta property="fb:app_id" content="1401488693436528">
<meta content="https://avatars1.githubusercontent.com/u/6157111?s=400&v=4" property="og:image" /><meta content="Gist" property="og:site_name" /><meta content="object" property="og:type" /><meta content="browsersync setup for proxying a remote site" property="og:title" /><meta content="https://gist.github.com/rdrew/c489934f91c237b335518335364bfd58" property="og:url" /><meta content="browsersync setup for proxying a remote site" property="og:description" />
<link rel="assets" href="https://assets-cdn.github.com/">
<meta name="pjax-timeout" content="1000">
<meta name="request-id" content="DBB2:3811:3ED612:720B3D:5A342A50" data-pjax-transient>
<meta name="selected-link" value="gist_code" data-pjax-transient>
<meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
<meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc">
<meta name="google-analytics" content="UA-3769691-4">
<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="gist" name="octolytics-app-id" /><meta content="https://collector.githubapp.com/github-external/browser_event" name="octolytics-event-url" /><meta content="DBB2:3811:3ED612:720B3D:5A342A50" name="octolytics-dimension-request_id" /><meta content="iad" name="octolytics-dimension-region_edge" /><meta content="iad" name="octolytics-dimension-region_render" />
<meta content="/<user-name>/<gist-id>" data-pjax-transient="true" name="analytics-location" />
<meta class="js-ga-set" name="dimension1" content="Logged Out">
<meta content="true" name="octolytics-dimension-public" /><meta content="81454465" name="octolytics-dimension-gist_id" /><meta content="c489934f91c237b335518335364bfd58" name="octolytics-dimension-gist_name" /><meta content="false" name="octolytics-dimension-anonymous" /><meta content="6157111" name="octolytics-dimension-owner_id" /><meta content="rdrew" name="octolytics-dimension-owner_login" /><meta content="false" name="octolytics-dimension-forked" />
<meta class="js-ga-set" name="dimension5" content="public">
<meta class="js-ga-set" name="dimension6" content="owned">
<meta class="js-ga-set" name="dimension7" content="javascript">
<meta name="hostname" content="gist.github.com">
<meta name="user-login" content="">
<meta name="expected-hostname" content="gist.github.com">
<meta name="js-proxy-site-detection-payload" content="NDc2ZWEyZDZhMDJmZjIzY2M4MjhmOTRlODZkOGE4ZDBmYTNmYzIzNDA0OWQ3ODE5MGMwYzU4NzQ3MmMxNGYxNXx7InJlbW90ZV9hZGRyZXNzIjoiMTM3LjE0OS4xNzguMTk0IiwicmVxdWVzdF9pZCI6IkRCQjI6MzgxMTozRUQ2MTI6NzIwQjNEOjVBMzQyQTUwIiwidGltZXN0YW1wIjoxNTEzMzY4MTQ1LCJob3N0IjoiZ2l0aHViLmNvbSJ9">
<meta name="html-safe-nonce" content="d15b1c86850b86252af749201fded4815a3dd4de">
<meta http-equiv="x-pjax-version" content="c6a2c2ccef54884452d61fd59c7b71ca">
<link href="/rdrew.atom" rel="alternate" title="atom" type="application/atom+xml">
<link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/gist-f0d67f3d7c0bd176fa6516aa440e609b7aaeeed2f027c8a6e001fa836eb0692f.css" media="all" rel="stylesheet" />
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#000000">
<link rel="icon" type="image/x-icon" class="js-site-favicon" href="https://assets-cdn.github.com/favicon.ico">
<meta name="theme-color" content="#1e2327">
</head>
<body class="logged-out env-production">
<div class="position-relative js-header-wrapper ">
<a href="#start-of-content" tabindex="1" class="px-2 py-4 show-on-focus js-skip-to-content">Skip to content</a>
<div id="js-pjax-loader-bar" class="pjax-loader-bar"><div class="progress"></div></div>
<div class="Header gist-header header-logged-out" role="banner">
<div class="container-lg px-3 clearfix">
<div class="d-flex flex-justify-between">
<div class="d-flex">
<a href="/" aria-label="Gist Homepage" class="header-logo-wordmark" data-hotkey="g d">
<svg aria-hidden="true" class="octicon octicon-logo-github" height="28" version="1.1" viewBox="0 0 45 16" width="78"><path fill-rule="evenodd" d="M18.53 12.03h-.02c.009 0 .015.01.024.011h.006l-.01-.01zm.004.011c-.093.001-.327.05-.574.05-.78 0-1.05-.36-1.05-.83V8.13h1.59c.09 0 .16-.08.16-.19v-1.7c0-.09-.08-.17-.16-.17h-1.59V3.96c0-.08-.05-.13-.14-.13h-2.16c-.09 0-.14.05-.14.13v2.17s-1.09.27-1.16.28c-.08.02-.13.09-.13.17v1.36c0 .11.08.19.17.19h1.11v3.28c0 2.44 1.7 2.69 2.86 2.69.53 0 1.17-.17 1.27-.22.06-.02.09-.09.09-.16v-1.5a.177.177 0 0 0-.146-.18zm23.696-2.2c0-1.81-.73-2.05-1.5-1.97-.6.04-1.08.34-1.08.34v3.52s.49.34 1.22.36c1.03.03 1.36-.34 1.36-2.25zm2.43-.16c0 3.43-1.11 4.41-3.05 4.41-1.64 0-2.52-.83-2.52-.83s-.04.46-.09.52c-.03.06-.08.08-.14.08h-1.48c-.1 0-.19-.08-.19-.17l.02-11.11c0-.09.08-.17.17-.17h2.13c.09 0 .17.08.17.17v3.77s.82-.53 2.02-.53l-.01-.02c1.2 0 2.97.45 2.97 3.88zm-8.72-3.61H33.84c-.11 0-.17.08-.17.19v5.44s-.55.39-1.3.39-.97-.34-.97-1.09V6.25c0-.09-.08-.17-.17-.17h-2.14c-.09 0-.17.08-.17.17v5.11c0 2.2 1.23 2.75 2.92 2.75 1.39 0 2.52-.77 2.52-.77s.05.39.08.45c.02.05.09.09.16.09h1.34c.11 0 .17-.08.17-.17l.02-7.47c0-.09-.08-.17-.19-.17zm-23.7-.01h-2.13c-.09 0-.17.09-.17.2v7.34c0 .2.13.27.3.27h1.92c.2 0 .25-.09.25-.27V6.23c0-.09-.08-.17-.17-.17zm-1.05-3.38c-.77 0-1.38.61-1.38 1.38 0 .77.61 1.38 1.38 1.38.75 0 1.36-.61 1.36-1.38 0-.77-.61-1.38-1.36-1.38zm16.49-.25h-2.11c-.09 0-.17.08-.17.17v4.09h-3.31V2.6c0-.09-.08-.17-.17-.17h-2.13c-.09 0-.17.08-.17.17v11.11c0 .09.09.17.17.17h2.13c.09 0 .17-.08.17-.17V8.96h3.31l-.02 4.75c0 .09.08.17.17.17h2.13c.09 0 .17-.08.17-.17V2.6c0-.09-.08-.17-.17-.17zM8.81 7.35v5.74c0 .04-.01.11-.06.13 0 0-1.25.89-3.31.89-2.49 0-5.44-.78-5.44-5.92S2.58 1.99 5.1 2c2.18 0 3.06.49 3.2.58.04.05.06.09.06.14L7.94 4.5c0 .09-.09.2-.2.17-.36-.11-.9-.33-2.17-.33-1.47 0-3.05.42-3.05 3.73s1.5 3.7 2.58 3.7c.92 0 1.25-.11 1.25-.11v-2.3H4.88c-.11 0-.19-.08-.19-.17V7.35c0-.09.08-.17.19-.17h3.74c.11 0 .19.08.19.17z"/></svg>
<svg aria-hidden="true" class="octicon octicon-logo-gist" height="28" version="1.1" viewBox="0 0 25 16" width="40"><path fill-rule="evenodd" d="M4.7 8.73h2.45v4.02c-.55.27-1.64.34-2.53.34-2.56 0-3.47-2.2-3.47-5.05 0-2.85.91-5.06 3.48-5.06 1.28 0 2.06.23 3.28.73V2.66C7.27 2.33 6.25 2 4.63 2 1.13 2 0 4.69 0 8.03c0 3.34 1.11 6.03 4.63 6.03 1.64 0 2.81-.27 3.59-.64V7.73H4.7v1zm6.39 3.72V6.06h-1.05v6.28c0 1.25.58 1.72 1.72 1.72v-.89c-.48 0-.67-.16-.67-.7v-.02zm.25-8.72c0-.44-.33-.78-.78-.78s-.77.34-.77.78.33.78.77.78.78-.34.78-.78zm4.34 5.69c-1.5-.13-1.78-.48-1.78-1.17 0-.77.33-1.34 1.88-1.34 1.05 0 1.66.16 2.27.36v-.94c-.69-.3-1.52-.39-2.25-.39-2.2 0-2.92 1.2-2.92 2.31 0 1.08.47 1.88 2.73 2.08 1.55.13 1.77.63 1.77 1.34 0 .73-.44 1.42-2.06 1.42-1.11 0-1.86-.19-2.33-.36v.94c.5.2 1.58.39 2.33.39 2.38 0 3.14-1.2 3.14-2.41 0-1.28-.53-2.03-2.75-2.23h-.03zm8.58-2.47v-.86h-2.42v-2.5l-1.08.31v2.11l-1.56.44v.48h1.56v5c0 1.53 1.19 2.13 2.5 2.13.19 0 .52-.02.69-.05v-.89c-.19.03-.41.03-.61.03-.97 0-1.5-.39-1.5-1.34V6.94h2.42v.02-.01z"/></svg>
</a>
<div class="site-search js-site-search" role="search">
<div class="header-search" role="search">
<!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/search" class="position-relative js-quicksearch-form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div>
<label class="header-search-wrapper form-control js-chromeless-input-container">
<input type="text"
class="form-control js-site-search-focus header-search-input"
data-hotkey="s"
name="q"
placeholder="Search…"
tabindex="1"
autocorrect="off"
autocomplete="off"
autocapitalize="off">
</label>
</form></div>
</div>
<ul class="list-style-none d-flex flex-items-center text-bold pl-2" role="navigation">
<li><a href="/discover" class="HeaderNavlink px-2" data-ga-click="Header, go to all gists, text:all gists">All gists</a></li>
<li><a href="https://github.com" class="HeaderNavlink px-2" data-ga-click="Header, go to GitHub, text:GitHub">GitHub</a></li>
</ul>
</div>
<div class="header-actions" role="navigation">
<a href="/join?source=header-gist" class="btn btn-primary" data-ga-click="Header, sign up">Sign up for a GitHub account</a>
<a href="https://gist.github.com/auth/github?return_to=https%3A%2F%2Fgist.github.com%2Frdrew%2Fc489934f91c237b335518335364bfd58" class="btn" data-ga-click="Header, sign in">Sign in</a>
</div>
</div>
</div>
</div>
</div>
<div id="start-of-content" class="show-on-focus"></div>
<div id="js-flash-container">
</div>
<div role="main">
<div itemscope itemtype="http://schema.org/Code">
<div id="gist-pjax-container" class="gist-content-wrapper" data-pjax-container>
<div class="gist-detail-intro gist-banner">
<div class="container">
<a href="/" class="btn btn-outline float-right">Create a gist now</a>
<p class="lead">
Instantly share code, notes, and snippets.
</p>
</div>
</div>
<div class="gisthead pagehead repohead instapaper_ignore readability-menu experiment-repo-nav mb-4">
<div class="container">
<div class="container repohead-details-container">
<ul class="pagehead-actions">
<li>
<a href="/login?return_to=https%3A%2F%2Fgist.github.com%2Frdrew%2Fc489934f91c237b335518335364bfd58" aria-label="You must be signed in to star a gist" class="btn btn-sm btn-with-count tooltipped tooltipped-n" rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"/></svg>
Star
</a>
<a href="/rdrew/c489934f91c237b335518335364bfd58/stargazers" aria-label="1 user starred this gist" class="social-count">
1
</a>
</li>
<li>
<a href="/login?return_to=https%3A%2F%2Fgist.github.com%2Frdrew%2Fc489934f91c237b335518335364bfd58" aria-label="You must be signed in to fork a gist" class="btn btn-sm btn-with-count tooltipped tooltipped-n" rel="nofollow">
<svg aria-hidden="true" class="octicon octicon-repo-forked" height="16" version="1.1" viewBox="0 0 10 16" width="10"><path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
Fork
</a>
<a href="/rdrew/c489934f91c237b335518335364bfd58/forks" aria-label="0 users forked this gist" class="social-count">
0
</a>
</li>
</ul>
<h1 class="public css-truncate">
<img alt="@rdrew" class="avatar gist-avatar" height="26" src="https://avatars1.githubusercontent.com/u/6157111?s=52&v=4" width="26" />
<span class="author"><a href="/rdrew" class="url fn" rel="author"><span itemprop="author">rdrew</span></a></span><!--
--><span class="path-divider">/</span><!--
--><strong itemprop="name" class="gist-header-title css-truncate-target"><a href="/rdrew/c489934f91c237b335518335364bfd58">bsProxy.js</a></strong>
<div class="d-block text-small text-gray">
Last active <time-ago datetime="2017-11-30T14:24:50Z">Nov 30, 2017</time-ago>
</div>
</h1>
</div>
<div class="container gist-file-navigation">
<div class="float-right file-navigation-options" data-multiple>
<div class="file-navigation-option">
<input type="hidden" name="protocol_type" value="clone">
<div class="select-menu js-menu-container js-select-menu">
<div class="input-group js-select-button js-zeroclipboard-container">
<div class="input-group-button">
<button type="button" class="btn btn-sm select-menu-button js-menu-target" data-ga-click="Repository, clone Embed, location:repo overview" aria-expanded="false" aria-haspopup="true">
Embed
</button>
</div>
<input type="text" class="form-control input-monospace input-sm js-zeroclipboard-target js-url-field" value="<script src="https://gist.github.com/rdrew/c489934f91c237b335518335364bfd58.js"></script>" aria-label="Clone this repository at <script src="https://gist.github.com/rdrew/c489934f91c237b335518335364bfd58.js"></script>" readonly>
<div class="input-group-button">
<button aria-label="Copy to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><svg aria-hidden="true" class="octicon octicon-clippy" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"/></svg></button>
</div>
</div>
<div class="select-menu-modal-holder">
<div class="select-menu-modal js-menu-content">
<div class="select-menu-header">
<svg aria-label="Close" class="octicon octicon-x js-menu-close" height="16" role="img" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
<span class="select-menu-title">What would you like to do?</span>
</div>
<div class="select-menu-list js-navigation-container" role="menu">
<div class="select-menu-item js-navigation-item selected" role="menuitem" tabindex="0">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
<div class="select-menu-item-text">
<input type="radio" name="protocol_selector" value="embed" checked>
<span class="select-menu-item-heading">
Embed
</span>
<span class="description">
Embed this gist in your website.
</span>
<span class="js-select-button-text hidden-select-button-text">
<div class="input-group-button">
<button type="button" class="btn btn-sm select-menu-button js-menu-target" data-ga-click="Repository, clone Embed, location:repo overview" aria-expanded="false" aria-haspopup="true">
Embed
</button>
</div>
<input type="text" class="form-control input-monospace input-sm js-zeroclipboard-target js-url-field" value="<script src="https://gist.github.com/rdrew/c489934f91c237b335518335364bfd58.js"></script>" aria-label="Clone this repository at <script src="https://gist.github.com/rdrew/c489934f91c237b335518335364bfd58.js"></script>" readonly>
<div class="input-group-button">
<button aria-label="Copy to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><svg aria-hidden="true" class="octicon octicon-clippy" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"/></svg></button>
</div>
</span>
</div>
</div>
<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
<div class="select-menu-item-text">
<input type="radio" name="protocol_selector" value="share" >
<span class="select-menu-item-heading">
Share
</span>
<span class="description">
Copy sharable URL for this gist.
</span>
<span class="js-select-button-text hidden-select-button-text">
<div class="input-group-button">
<button type="button" class="btn btn-sm select-menu-button js-menu-target" data-ga-click="Repository, clone Share, location:repo overview" aria-expanded="false" aria-haspopup="true">
Share
</button>
</div>
<input type="text" class="form-control input-monospace input-sm js-zeroclipboard-target js-url-field" value="https://gist.github.com/rdrew/c489934f91c237b335518335364bfd58" aria-label="Clone this repository at https://gist.github.com/rdrew/c489934f91c237b335518335364bfd58" readonly>
<div class="input-group-button">
<button aria-label="Copy to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><svg aria-hidden="true" class="octicon octicon-clippy" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"/></svg></button>
</div>
</span>
</div>
</div>
<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
<svg aria-hidden="true" class="octicon octicon-check select-menu-item-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5z"/></svg>
<div class="select-menu-item-text">
<input type="radio" name="protocol_selector" value="http" >
<span class="select-menu-item-heading">
Clone via
HTTPS
</span>
<span class="description">
Clone with Git or checkout with SVN using the repository's web address.
</span>
<span class="js-select-button-text hidden-select-button-text">
<div class="input-group-button">
<button type="button" class="btn btn-sm select-menu-button js-menu-target" data-ga-click="Repository, clone HTTPS, location:repo overview" aria-expanded="false" aria-haspopup="true">
HTTPS
</button>
</div>
<input type="text" class="form-control input-monospace input-sm js-zeroclipboard-target js-url-field" value="https://gist.github.com/c489934f91c237b335518335364bfd58.git" aria-label="Clone this repository at https://gist.github.com/c489934f91c237b335518335364bfd58.git" readonly>
<div class="input-group-button">
<button aria-label="Copy to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><svg aria-hidden="true" class="octicon octicon-clippy" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"/></svg></button>
</div>
</span>
</div>
</div>
</div>
<div class="select-menu-list" role="menu">
<a class="select-menu-item select-menu-action" href="https://help.github.com/articles/which-remote-url-should-i-use" target="_blank">
<svg aria-hidden="true" class="octicon octicon-question select-menu-item-icon" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M6 10h2v2H6v-2zm4-3.5C10 8.64 8 9 8 9H6c0-.55.45-1 1-1h.5c.28 0 .5-.22.5-.5v-1c0-.28-.22-.5-.5-.5h-1c-.28 0-.5.22-.5.5V7H4c0-1.5 1.5-3 3-3s3 1 3 2.5zM7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7z"/></svg>
<div class="select-menu-item-text">
Learn more about clone URLs
</div>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="file-navigation-option">
</div>
<div class="file-navigation-option">
<a href="/rdrew/c489934f91c237b335518335364bfd58/archive/b4795b563a98a91714fb33ca42bec7935fa4d5de.zip"
class="btn btn-sm"
rel="nofollow"
data-ga-click="Gist, download zip, location:gist overview">
Download ZIP
</a>
</div>
</div>
<div class="float-left">
<nav class="reponav js-repo-nav js-sidenav-container-pjax"
role="navigation"
data-pjax="#gist-pjax-container">
<a href="/rdrew/c489934f91c237b335518335364bfd58" aria-label="Code" class="js-selected-navigation-item selected reponav-item" data-hotkey="g c" data-pjax="true" data-selected-links="gist_code /rdrew/c489934f91c237b335518335364bfd58">
<svg aria-hidden="true" class="octicon octicon-code" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z"/></svg>
Code
</a>
<a href="/rdrew/c489934f91c237b335518335364bfd58/revisions" aria-label="Revisions" class="js-selected-navigation-item reponav-item" data-hotkey="g r" data-pjax="true" data-selected-links="gist_revisions /rdrew/c489934f91c237b335518335364bfd58/revisions">
<svg aria-hidden="true" class="octicon octicon-git-commit" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M10.86 7c-.45-1.72-2-3-3.86-3-1.86 0-3.41 1.28-3.86 3H0v2h3.14c.45 1.72 2 3 3.86 3 1.86 0 3.41-1.28 3.86-3H14V7h-3.14zM7 10.2c-1.22 0-2.2-.98-2.2-2.2 0-1.22.98-2.2 2.2-2.2 1.22 0 2.2.98 2.2 2.2 0 1.22-.98 2.2-2.2 2.2z"/></svg>
Revisions
<span class="Counter">3</span>
</a>
<a href="/rdrew/c489934f91c237b335518335364bfd58/stargazers" aria-label="Stars" class="js-selected-navigation-item reponav-item" data-hotkey="g s" data-pjax="true" data-selected-links="gist_stars /rdrew/c489934f91c237b335518335364bfd58/stargazers">
<svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"/></svg>
Stars
<span class="Counter">1</span>
</a>
</nav>
</div>
</div>
</div>
</div>
<div class="container new-discussion-timeline experiment-repo-nav">
<div class="repository-content gist-content">
<div>
<div class="repository-meta js-details-container Details">
<div class="repository-meta-content" itemprop="about">
browsersync setup for proxying a remote site
</div>
</div>
<div class="js-gist-file-update-container js-task-list-container file-box">
<div id="file-bsproxy-js" class="file">
<div class="file-header">
<div class="file-actions">
<a href="/rdrew/c489934f91c237b335518335364bfd58/raw/b4795b563a98a91714fb33ca42bec7935fa4d5de/bsProxy.js" class="btn btn-sm ">Raw</a>
</div>
<div class="file-info">
<span class="icon">
<svg aria-hidden="true" class="octicon octicon-gist" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.5 5L10 7.5 7.5 10l-.75-.75L8.5 7.5 6.75 5.75 7.5 5zm-3 0L2 7.5 4.5 10l.75-.75L3.5 7.5l1.75-1.75L4.5 5zM0 13V2c0-.55.45-1 1-1h10c.55 0 1 .45 1 1v11c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1zm1 0h10V2H1v11z"/></svg>
</span>
<a class="tooltipped tooltipped-s css-truncate" aria-label="Permalink" href="#file-bsproxy-js">
<strong class="user-select-contain gist-blob-name css-truncate-target">
bsProxy.js
</strong>
</a>
</div>
</div>
<div itemprop="text" class="blob-wrapper data type-javascript">
<table class="highlight tab-size js-file-line-container" data-tab-size="8">
<tr>
<td id="file-bsproxy-js-L1" class="blob-num js-line-number" data-line-number="1"></td>
<td id="file-bsproxy-js-LC1" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">/*</span></span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L2" class="blob-num js-line-number" data-line-number="2"></td>
<td id="file-bsproxy-js-LC2" class="blob-code blob-code-inner js-file-line"><span class="pl-c"> * Proxy Live site and inject local files</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L3" class="blob-num js-line-number" data-line-number="3"></td>
<td id="file-bsproxy-js-LC3" class="blob-code blob-code-inner js-file-line"><span class="pl-c"> * - run 'npm install --save-dev browser-sync'</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L4" class="blob-num js-line-number" data-line-number="4"></td>
<td id="file-bsproxy-js-LC4" class="blob-code blob-code-inner js-file-line"><span class="pl-c"> * - change the varables below as needed</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L5" class="blob-num js-line-number" data-line-number="5"></td>
<td id="file-bsproxy-js-LC5" class="blob-code blob-code-inner js-file-line"><span class="pl-c"> * - 'node bsProxy' to run the task</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L6" class="blob-num js-line-number" data-line-number="6"></td>
<td id="file-bsproxy-js-LC6" class="blob-code blob-code-inner js-file-line"><span class="pl-c"> <span class="pl-c">*/</span></span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L7" class="blob-num js-line-number" data-line-number="7"></td>
<td id="file-bsproxy-js-LC7" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">//</span></span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L8" class="blob-num js-line-number" data-line-number="8"></td>
<td id="file-bsproxy-js-LC8" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">//</span>initialize all of our variables</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L9" class="blob-num js-line-number" data-line-number="9"></td>
<td id="file-bsproxy-js-LC9" class="blob-code blob-code-inner js-file-line"><span class="pl-k">var</span> <span class="pl-c1">PROXY</span>, <span class="pl-c1">ASSETS_DIR</span>, <span class="pl-c1">REMOTE_ASSETS_PATH</span>, <span class="pl-c1">REGEX</span>, browserSync, serveStatic;</td>
</tr>
<tr>
<td id="file-bsproxy-js-L10" class="blob-num js-line-number" data-line-number="10"></td>
<td id="file-bsproxy-js-LC10" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-bsproxy-js-L11" class="blob-num js-line-number" data-line-number="11"></td>
<td id="file-bsproxy-js-LC11" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">//</span> Url of the site to be proxied</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L12" class="blob-num js-line-number" data-line-number="12"></td>
<td id="file-bsproxy-js-LC12" class="blob-code blob-code-inner js-file-line"><span class="pl-c1">PROXY</span> <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">'</span>https://curiosity.discoveryspace.ca<span class="pl-pds">'</span></span>;</td>
</tr>
<tr>
<td id="file-bsproxy-js-L13" class="blob-num js-line-number" data-line-number="13"></td>
<td id="file-bsproxy-js-LC13" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">//</span> Root assets folder (contains /css/, /js/ etc)</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L14" class="blob-num js-line-number" data-line-number="14"></td>
<td id="file-bsproxy-js-LC14" class="blob-code blob-code-inner js-file-line"><span class="pl-c1">ASSETS_DIR</span> <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">'</span>assets<span class="pl-pds">'</span></span>;</td>
</tr>
<tr>
<td id="file-bsproxy-js-L15" class="blob-num js-line-number" data-line-number="15"></td>
<td id="file-bsproxy-js-LC15" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">//</span> Path on server to remote assets folder (escape the slashes; no trailing slash)</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L16" class="blob-num js-line-number" data-line-number="16"></td>
<td id="file-bsproxy-js-LC16" class="blob-code blob-code-inner js-file-line"><span class="pl-c1">REMOTE_ASSETS_PATH</span> <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">'</span><span class="pl-cce">\/</span>themes<span class="pl-cce">\/</span>custom<span class="pl-cce">\/</span>curiosity<span class="pl-cce">\/</span>assets<span class="pl-pds">'</span></span>;</td>
</tr>
<tr>
<td id="file-bsproxy-js-L17" class="blob-num js-line-number" data-line-number="17"></td>
<td id="file-bsproxy-js-LC17" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-bsproxy-js-L18" class="blob-num js-line-number" data-line-number="18"></td>
<td id="file-bsproxy-js-LC18" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-bsproxy-js-L19" class="blob-num js-line-number" data-line-number="19"></td>
<td id="file-bsproxy-js-LC19" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">//</span>===================================</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L20" class="blob-num js-line-number" data-line-number="20"></td>
<td id="file-bsproxy-js-LC20" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">//</span> Includes and vars</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L21" class="blob-num js-line-number" data-line-number="21"></td>
<td id="file-bsproxy-js-LC21" class="blob-code blob-code-inner js-file-line">browserSync <span class="pl-k">=</span> <span class="pl-c1">require</span>(<span class="pl-s"><span class="pl-pds">'</span>browser-sync<span class="pl-pds">'</span></span>);</td>
</tr>
<tr>
<td id="file-bsproxy-js-L22" class="blob-num js-line-number" data-line-number="22"></td>
<td id="file-bsproxy-js-LC22" class="blob-code blob-code-inner js-file-line">serveStatic <span class="pl-k">=</span> <span class="pl-c1">require</span>(<span class="pl-s"><span class="pl-pds">'</span>serve-static<span class="pl-pds">'</span></span>);</td>
</tr>
<tr>
<td id="file-bsproxy-js-L23" class="blob-num js-line-number" data-line-number="23"></td>
<td id="file-bsproxy-js-LC23" class="blob-code blob-code-inner js-file-line"><span class="pl-c1">REGEX</span> <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-en">RegExp</span>( <span class="pl-c1">REMOTE_ASSETS_PATH</span>, <span class="pl-s"><span class="pl-pds">'</span>g<span class="pl-pds">'</span></span>);</td>
</tr>
<tr>
<td id="file-bsproxy-js-L24" class="blob-num js-line-number" data-line-number="24"></td>
<td id="file-bsproxy-js-LC24" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">//</span>===================================</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L25" class="blob-num js-line-number" data-line-number="25"></td>
<td id="file-bsproxy-js-LC25" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-bsproxy-js-L26" class="blob-num js-line-number" data-line-number="26"></td>
<td id="file-bsproxy-js-LC26" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-bsproxy-js-L27" class="blob-num js-line-number" data-line-number="27"></td>
<td id="file-bsproxy-js-LC27" class="blob-code blob-code-inner js-file-line"><span class="pl-c"><span class="pl-c">/*</span></span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L28" class="blob-num js-line-number" data-line-number="28"></td>
<td id="file-bsproxy-js-LC28" class="blob-code blob-code-inner js-file-line"><span class="pl-c"> * Browsersync Task</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L29" class="blob-num js-line-number" data-line-number="29"></td>
<td id="file-bsproxy-js-LC29" class="blob-code blob-code-inner js-file-line"><span class="pl-c"> *</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L30" class="blob-num js-line-number" data-line-number="30"></td>
<td id="file-bsproxy-js-LC30" class="blob-code blob-code-inner js-file-line"><span class="pl-c"> <span class="pl-c">*/</span></span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L31" class="blob-num js-line-number" data-line-number="31"></td>
<td id="file-bsproxy-js-LC31" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-bsproxy-js-L32" class="blob-num js-line-number" data-line-number="32"></td>
<td id="file-bsproxy-js-LC32" class="blob-code blob-code-inner js-file-line"><span class="pl-en">browserSync</span>({</td>
</tr>
<tr>
<td id="file-bsproxy-js-L33" class="blob-num js-line-number" data-line-number="33"></td>
<td id="file-bsproxy-js-LC33" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-bsproxy-js-L34" class="blob-num js-line-number" data-line-number="34"></td>
<td id="file-bsproxy-js-LC34" class="blob-code blob-code-inner js-file-line"> <span class="pl-c"><span class="pl-c">//</span> proxy live site</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L35" class="blob-num js-line-number" data-line-number="35"></td>
<td id="file-bsproxy-js-LC35" class="blob-code blob-code-inner js-file-line"> proxy<span class="pl-k">:</span> <span class="pl-c1">PROXY</span>,</td>
</tr>
<tr>
<td id="file-bsproxy-js-L36" class="blob-num js-line-number" data-line-number="36"></td>
<td id="file-bsproxy-js-LC36" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-bsproxy-js-L37" class="blob-num js-line-number" data-line-number="37"></td>
<td id="file-bsproxy-js-LC37" class="blob-code blob-code-inner js-file-line"> <span class="pl-c"><span class="pl-c">//</span> modify url of the remote assets so they point to the locally served version</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L38" class="blob-num js-line-number" data-line-number="38"></td>
<td id="file-bsproxy-js-LC38" class="blob-code blob-code-inner js-file-line"> rewriteRules<span class="pl-k">:</span> [</td>
</tr>
<tr>
<td id="file-bsproxy-js-L39" class="blob-num js-line-number" data-line-number="39"></td>
<td id="file-bsproxy-js-LC39" class="blob-code blob-code-inner js-file-line"> {</td>
</tr>
<tr>
<td id="file-bsproxy-js-L40" class="blob-num js-line-number" data-line-number="40"></td>
<td id="file-bsproxy-js-LC40" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-bsproxy-js-L41" class="blob-num js-line-number" data-line-number="41"></td>
<td id="file-bsproxy-js-LC41" class="blob-code blob-code-inner js-file-line"> <span class="pl-c"><span class="pl-c">//</span>match: /REMOTE_ASSETS_PATH/g,</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L42" class="blob-num js-line-number" data-line-number="42"></td>
<td id="file-bsproxy-js-LC42" class="blob-code blob-code-inner js-file-line"> match<span class="pl-k">:</span> <span class="pl-c1">REGEX</span>,</td>
</tr>
<tr>
<td id="file-bsproxy-js-L43" class="blob-num js-line-number" data-line-number="43"></td>
<td id="file-bsproxy-js-LC43" class="blob-code blob-code-inner js-file-line"> <span class="pl-en">fn</span><span class="pl-k">:</span> <span class="pl-k">function</span>(<span class="pl-smi">matched</span>) { <span class="pl-k">return</span> <span class="pl-s"><span class="pl-pds">'</span><span class="pl-pds">'</span></span> }</td>
</tr>
<tr>
<td id="file-bsproxy-js-L44" class="blob-num js-line-number" data-line-number="44"></td>
<td id="file-bsproxy-js-LC44" class="blob-code blob-code-inner js-file-line"> <span class="pl-c"><span class="pl-c">//</span>match: REGEX,</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L45" class="blob-num js-line-number" data-line-number="45"></td>
<td id="file-bsproxy-js-LC45" class="blob-code blob-code-inner js-file-line"> <span class="pl-c"><span class="pl-c">//</span>fn: function (req, res, match) {</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L46" class="blob-num js-line-number" data-line-number="46"></td>
<td id="file-bsproxy-js-LC46" class="blob-code blob-code-inner js-file-line"> <span class="pl-c"><span class="pl-c">//</span>return '';</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L47" class="blob-num js-line-number" data-line-number="47"></td>
<td id="file-bsproxy-js-LC47" class="blob-code blob-code-inner js-file-line"> <span class="pl-c"><span class="pl-c">//</span>}</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L48" class="blob-num js-line-number" data-line-number="48"></td>
<td id="file-bsproxy-js-LC48" class="blob-code blob-code-inner js-file-line"> }</td>
</tr>
<tr>
<td id="file-bsproxy-js-L49" class="blob-num js-line-number" data-line-number="49"></td>
<td id="file-bsproxy-js-LC49" class="blob-code blob-code-inner js-file-line"> ],</td>
</tr>
<tr>
<td id="file-bsproxy-js-L50" class="blob-num js-line-number" data-line-number="50"></td>
<td id="file-bsproxy-js-LC50" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-bsproxy-js-L51" class="blob-num js-line-number" data-line-number="51"></td>
<td id="file-bsproxy-js-LC51" class="blob-code blob-code-inner js-file-line"> <span class="pl-c"><span class="pl-c">//</span> serve up these local files</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L52" class="blob-num js-line-number" data-line-number="52"></td>
<td id="file-bsproxy-js-LC52" class="blob-code blob-code-inner js-file-line"> serveStatic<span class="pl-k">:</span> [<span class="pl-c1">ASSETS_DIR</span>],</td>
</tr>
<tr>
<td id="file-bsproxy-js-L53" class="blob-num js-line-number" data-line-number="53"></td>
<td id="file-bsproxy-js-LC53" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-bsproxy-js-L54" class="blob-num js-line-number" data-line-number="54"></td>
<td id="file-bsproxy-js-LC54" class="blob-code blob-code-inner js-file-line"> <span class="pl-c"><span class="pl-c">//</span> Watch this stuff for changes and inject it if it does</span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L55" class="blob-num js-line-number" data-line-number="55"></td>
<td id="file-bsproxy-js-LC55" class="blob-code blob-code-inner js-file-line"> files<span class="pl-k">:</span> <span class="pl-c1">ASSETS_DIR</span> <span class="pl-k">+</span> <span class="pl-s"><span class="pl-pds">'</span>/**<span class="pl-pds">'</span></span></td>
</tr>
<tr>
<td id="file-bsproxy-js-L56" class="blob-num js-line-number" data-line-number="56"></td>
<td id="file-bsproxy-js-LC56" class="blob-code blob-code-inner js-file-line">
</td>
</tr>
<tr>
<td id="file-bsproxy-js-L57" class="blob-num js-line-number" data-line-number="57"></td>
<td id="file-bsproxy-js-LC57" class="blob-code blob-code-inner js-file-line">});</td>
</tr>
</table>
</div>
</div>
</div>
<a name="comments"></a>
<div class="discussion-timeline gist-discussion-timeline js-quote-selection-container ">
<div class="js-discussion js-socket-channel" data-channel="marked-as-read:gist:81454465">
<!-- Rendered timeline since 2017-11-30 06:24:50 -->
<div id="partial-timeline-marker"
class="js-timeline-marker js-updatable-content"
data-url="/rdrew/c489934f91c237b335518335364bfd58/show_partial?partial=gist%2Ftimeline_marker&since=1512051890"
data-last-modified="Thu, 30 Nov 2017 14:24:50 GMT"
>
</div>
<div class="discussion-timeline-actions">
<div class="flash flash-warn mt-3">
<a href="/join?source=comment-gist" class="btn btn-primary" rel="nofollow">Sign up for free</a>
<strong>to join this conversation on GitHub</strong>.
Already have an account?
<a href="/login?return_to=https%3A%2F%2Fgist.github.com%2Frdrew%2Fc489934f91c237b335518335364bfd58" rel="nofollow">Sign in to comment</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-backdrop js-touch-events"></div>
</div><!-- /.container -->
</div>
</div>
</div>
<div class="footer container-lg px-3" role="contentinfo">
<div class="position-relative d-flex flex-justify-between py-6 mt-6 f6 text-gray border-top border-gray-light ">
<ul class="list-style-none d-flex flex-wrap ">
<li class="mr-3">© 2017 <span title="0.30104s from unicorn-1084658072-f1c4q">GitHub</span>, Inc.</li>
<li class="mr-3"><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
<li class="mr-3"><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
<li class="mr-3"><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
<li class="mr-3"><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
<li><a href="https://help.github.com" data-ga-click="Footer, go to help, text:help">Help</a></li>
</ul>
<a href="https://github.com" aria-label="Homepage" class="footer-octicon" title="GitHub">
<svg aria-hidden="true" class="octicon octicon-mark-github" height="24" version="1.1" viewBox="0 0 16 16" width="24"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
</a>
<ul class="list-style-none d-flex flex-wrap ">
<li class="mr-3"><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact GitHub</a></li>
<li class="mr-3"><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
<li class="mr-3"><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
<li class="mr-3"><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
<li class="mr-3"><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
<li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>
</ul>
</div>
</div>
<div id="ajax-error-message" class="ajax-error-message flash flash-error">
<svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/></svg>
<button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
<svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
</button>
You can't perform that action at this time.
</div>
<script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/compat-e42a8bf9c380758734e39851db04de7cbeeb2f3860efbd481c96ac12c25a6ecb.js"></script>
<script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/frameworks-12c0496716f4944b157a59cd9ebaf3c423f2875228732f1111242f80d5ce22af.js"></script>
<script async="async" crossorigin="anonymous" src="https://assets-cdn.github.com/assets/github-7501183630a99307960bca9663b35fc7390e81f52ccbdff20de73a839d726298.js"></script>
<div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner d-none">
<svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/></svg>
<span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
<span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
</div>
<div class="facebox" id="facebox" style="display:none;">
<div class="facebox-popup">
<div class="facebox-content" role="dialog" aria-labelledby="facebox-header" aria-describedby="facebox-description">
</div>
<button type="button" class="facebox-close js-facebox-close" aria-label="Close modal">
<svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
</button>
</div>
</div>
</body>
</html>