mirror of
https://github.com/neocities/neocities.git
synced 2025-08-04 00:31:59 +02:00
new strategy for surf mode
This commit is contained in:
parent
0efa3cada0
commit
75f6c5d31b
6 changed files with 47 additions and 7 deletions
6
app.rb
6
app.rb
|
@ -21,7 +21,13 @@ helpers do
|
|||
end
|
||||
end
|
||||
|
||||
set :protection, :frame_options => "ALLOW-FROM #{$config['surf_iframe_source']}"
|
||||
|
||||
before do
|
||||
if request.host.match /\w+\.#{Addressable::URI.parse($config['surf_proxy_uri']).host}/i
|
||||
surf_proxy
|
||||
end
|
||||
|
||||
if request.path.match /^\/api\//i
|
||||
@api = true
|
||||
content_type :json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue