>> request.url
=> "http://localhost:3000/ask-help.amp?ptn=pnh"
>> request.path
=> "/ask-help.amp"
# NOTE! | |
# Helicon Zoo module runs this script every time IIS application pool recycles. | |
# This has several reasons: | |
# 1. you may not have ability to run required commands yourself (on a shared hosting, for example); | |
# 2. specific URL for deployment may cause security issues; | |
# 3. application pool doesn't recycle often. | |
# | |
# If you're sure you don't need this file, it can be removed. | |
APP_ROOT = File.dirname( __FILE__ ) |
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<heliconZoo> | |
<application name="rails.project.x86" > | |
<environmentVariables> | |
<add name="DEPLOY_FILE" value="deploy.rb" /> | |
<add name="DEPLOY_LOG" value="log\zoo-deploy.log" /> |
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<handlers> | |
<!-- | |
This removes Helicon Zoo handler and makes IIS processing static files. | |
--> | |
<remove name="rails.project.x64" /> | |
<remove name="rails.project.x86" /> |
# Demonstration of the code execution difference in speed when class, object and local variables are used. | |
# This example shows class variables performing much much worst, perhaps due to internal synchronization within Ruby engine. | |
# I've recently noticed that issue, profiling my code, so I don't really know the reason. | |
# The PI calculation algorithm has been taken somewhere and might be not best, but that's not the point. | |
# Results: | |
# MRI 1.9.3 | |
# user system total real | |
# @@class => 434.228000 0.063000 434.291000 (437.134613) | |
# @object => 200.243000 0.031000 200.274000 (202.477156) | |
# local => 132.492000 0.000000 132.492000 (133.706739) |
<Import | |
Condition="'$(IsDesktopBuild)' == 'true'" | |
Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v11.0\ | |
WebApplications\Microsoft.WebApplication.targets" /> | |
<Import | |
Condition="'$(IsDesktopBuild)' == 'false'" | |
Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\ | |
WebApplications\Microsoft.WebApplication.targets" /> |
var print_window = window.open( '', 'Title', 'height=400,width=600' ); | |
print_window.document.write( '<html><body><h1>Hello!</h1></body></html>' ); | |
// NOTE: two statements below make it all work in IE 10. | |
print_window.document.close(); | |
print_window.focus(); | |
print_window.print(); | |
print_window.close(); |
One of the possibilities is that in your elasticsearch.yml
you have
CORS enabled and the regex you use to match the origin doesn’t work.
For example Chrome extensions add chrome-extension:// to the origin and matching it as /https?:\/\/.+/
won’t work.
Instead you may use broader regex:
http.cors.enabled: true
http.cors.allow-origin: /.*/