phantom_proxy 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,6 +40,9 @@ PP_PID_NAME="phantom_proxy"
40
40
 
41
41
  PP_HMAC="none"
42
42
 
43
+ PP_USER_STANDARD=experteer
44
+ PP_USER=experteer
45
+
43
46
  PP_LOG()
44
47
  {
45
48
  local log_dir="/tmp/$PP_NAME"
@@ -65,7 +68,7 @@ PP_LOG_FILE()
65
68
 
66
69
  PP_PID()
67
70
  {
68
- echo "$(PP_LOG)/$PP_PID_NAME.pid"
71
+ echo "/tmp/pids/$PP_PID_NAME.pid"
69
72
  }
70
73
 
71
74
  PP_PORT=3003
@@ -94,6 +97,8 @@ load_config_file()
94
97
 
95
98
  run_for_configs()
96
99
  {
100
+ PP_USER=$PP_USER_STANDARD
101
+
97
102
  cfg_folder=$(PP_CONFIG)
98
103
  echo "Check config $cfg_folder"
99
104
  if [ -d $cfg_folder ]; then
@@ -124,7 +129,7 @@ do_start()
124
129
  return
125
130
  fi
126
131
  echo "Starting $PP_NAME service"
127
- $PP_NAME $(PP_OPTIONS)
132
+ sudo su -c "$PP_NAME $(PP_OPTIONS)" $PP_USER
128
133
  }
129
134
 
130
135
  do_stop()
@@ -24,7 +24,7 @@ module PhantomJSProxy
24
24
  attr_accessor :hmac_activated
25
25
 
26
26
  def check_for_route(url)
27
- if /\.js/i.match(url)
27
+ if /\.js/i.match(url) and !/\.jsp/i.match(url)
28
28
  return 'text/html';
29
29
  end
30
30
  if /\.css/i.match(url)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phantom_proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-21 00:00:00.000000000 Z
12
+ date: 2012-06-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thin