commit 5e6beca58573471a98fe2762f3d32b070464af44
Author: Richard Eriksson <richard@justagwailo.com>
Date:   Thu Jul 11 12:10:26 2013 -0700

    Administration interface based on the patch at https://drupal.org/node/1014466 with other unrelated fixed stripped out.

diff --git a/stage_file_proxy.admin.inc b/stage_file_proxy.admin.inc
new file mode 100644
index 0000000..1bd6f61
--- /dev/null
+++ b/stage_file_proxy.admin.inc
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * Settings form.
+ */
+function stage_file_proxy_settings() {
+  $form['stage_file_proxy_origin'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Origin server URL'),
+    '#description' => t('URL to the remote site from which missing files will be retrieved.'),
+    '#field_suffix' => t('(no trailing slash)'),
+    '#default_value' => variable_get('stage_file_proxy_origin', NULL),
+    '#required' => TRUE,
+  );
+  $form['stage_file_proxy_origin_dir'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Origin server public file system path'),
+    '#description' => t('Public path of the remote site from which missing files will be retrieved.'),
+    '#field_suffix' => t('(no trailing slash)'),
+    '#default_value' => variable_get('stage_file_proxy_origin_dir',variable_get('file_public_path', conf_path() . '/files')),
+  );
+  $form['stage_file_proxy_use_imagecache_root'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Download source image files'),
+    '#description' => t('If checked, then Stage File Proxy will look for /styles/ in the URL and determine the original file and request that rather than the processed file, then send a header to the browser to refresh the image and let Drupal handle it. This will speed up future requests for the same original file.'),
+    '#default_value' => variable_get('stage_file_proxy_use_imagecache_root', TRUE),
+  );
+  $form['stage_file_proxy_hotlink'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Use 301 Redirect (instead of downloading)'),
+    '#description' => t('If checked, then Stage File Proxy will not transfer the remote file to the local machine; instead, it will serve a 301 Redirect to the remote file and let the origin server handle it.'),
+    '#default_value' => variable_get('stage_file_proxy_hotlink', FALSE),
+  );
+  return system_settings_form($form);
+}
diff --git a/stage_file_proxy.info b/stage_file_proxy.info
index 741c439..7cd8409 100644
--- a/stage_file_proxy.info
+++ b/stage_file_proxy.info
@@ -2,4 +2,4 @@ name = Stage File Proxy
 description = Proxies files from production server so you don't have to transfer them manually
 core = 7.x
 version=7.x-0.1-dev
-
+configure = admin/config/development/stage_file_proxy
diff --git a/stage_file_proxy.module b/stage_file_proxy.module
index 7eb99bf..73eb7d6 100644
--- a/stage_file_proxy.module
+++ b/stage_file_proxy.module
@@ -1,4 +1,20 @@
 <?php
+
+/**
+ * Implements hook_menu().
+ */
+function stage_file_proxy_menu() {
+  $items['admin/config/development/stage_file_proxy'] = array(
+    'title' => 'Stage File Proxy',
+    'description' => 'Administer the Stage File Proxy settings.',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('stage_file_proxy_settings'),
+    'access arguments' => array('administer site configuration'),
+    'file' => 'stage_file_proxy.admin.inc',
+  );
+  return $items;
+}
+
 /**
  * Implements hook_init().
  * Intercepts certain requests and attempts to hotlink/download the remote
