it's possible to setup a Open URL for MIME type support at (console.developer.google.com). That's create and works fine for my application. But only for the product instance at Google Cloud. In detail:
I've released my application in version 1. It's AppEngine base and it supports a Open URL myapp.appspot.com/oauth2callback. So after the release I will going on with feature development for version 2. I use the local AppEngine dev setup. So I take my second client ID and change the Open URL to my local workstation mydev.workstation.com:8080/oauth2callback. That works fine, but it breaks my product instance. Is there any workaround to use Open URL for the production instance and a second Open URL for my dev instance? In my opinion the Drive SDK settings should be:
enable Authentication Production:
Client ID: xxx
Additional Scopes:
Install URL:
Open URL: https://myapp.appspot.com/oauth2callback
enable Authentication Development:
Client ID: xxx
Additional Scopes:
Install URL:
Open URL: http://devworkstation.com:8080/oauth2callback
Jens
Create separate projects in the console for prod/qa/dev
The answer from #SteveBazyl is the preferred one for all the reasons stated. A kludgy alternative would be to have the servlet that is bound to the Open URL detect when it is dealing with a test scenario and do a 301 redirect to your dev server.
Also, the API URL is pretty consistent, so once you've sniffed it once, it's not to difficult to path the host and use it in a curl script or browser bookmark for local testing.
As an aside "oauth2callback" is a slightly odd name for your Drive Open URL. It's not wrong, but "driveopen" would show the separate concerns.
Related
Introduction
Honestry,I'm not native English user,so my English is not better.
If you have any question, ask me by comment.
what I wanna do
As a premise,when you try to access local files by web site link,IE or FireFox can access( by simple setting) ,but Chrome can't access for their security poricy.
I found the ways to do this, like below:
add --allow-file-access-from-files option when you execute chrome.exe
build a local server like nginx or Apache HTTP Server,which meditate to access local data
Use chrome extentionEnable local file links
Due to business restrictions,I should resolve this problem by method 1. but I can't enable loacl data link though I set option correctly.
I googled why I can't,but I couldn't find why it won't work.
(In the first place,I can't even find Google official description of --allow-file-access-from-files.How predecessors find that method ... )
While searching、I found person who have the same question、Google Forum.
I'm convinced that this is not my simple miss,but more deep problem,so I decided to make this question.
what I tried
I rebooted computer,killed all process related to chrome,then change directory where contains chrome executable file,and execute chrome.exe --allow-file-access-from-files
I rebooted computer,killed all process related to chrome 、create shortcut on my Desktop ,which destination is "/path/to/chrome/chrome.exe"--allow-file-access-from-files
After execute chrome,I checked chrome boot option to accesschrome://version/.Both method, I could boot chrome by add --allow-file-access-from-files option,but can't achieve first purpose to access local file access.
what I wanna know
lacking or similar to --allow-file-access-from-filesoption、
(solution similar to method 2 or method 3,like "Give up option solution,and use nginx as local server" is unnecessary)
or other solution
Additionary,if you know below info,please teach me.
- Google official documentation which descriptionsallow-file-access-from-files
( Indended to Oracle official Javadoc of Java.)
Using Tool
Chrome Version : 78.0.3904.87
OS : WIndows 7 SP1
Is there a way in VS 2015 to start browser-link debug session with specific command-line options on Chrome like “--unsafely-treat-insecure-origin-as-secure=http://example.com". My objective is to debug a domain & subdomain "combo" in an insecure (http://) environment but Google now limits “powerful feature” to secure environments (https://) and this is one of their preferred workarounds. See more HERE. I know that I can probably start a manual instance of Chrome to the debug server:port but it would be nicer if it were integrated. I've text-searched the entire project for "chrome.exe" as a start but nothing was there.
I’ve tried to set up a domain & subdomain with SSL and I’ve failed miserably, so this is a (hopefully) a workaround for now. :-)
Edit2: Additional info: I use a machine-name:port setup along with a subdomain embedded in an iframe. Ex: http://MyMachine:50080 and the iFrame is at 192.168.48.116.
I am trying to build a (single page) local portal in Chrome that opens several things.
The problem is we want to run a local executable via a button on a (local) webpage. Is this possible?
The second thing is that i want to do is to run a .pps file directly in the powerpoint viewer.
I can control to the startup of chrome, so i can access local files.
All things i tried so far only made the file(s) to download, not to run.
Can somebody help me how i get this done?
You can set a protocol like myapp://launch/activity or the like to automatically launch your app by setting up a registry key in HKEY_CLASSES_ROOT with the name of your protocol and the action it should take.
There is a MSDN article showing the following example of a registry for an alert protocol:
HKEY_CLASSES_ROOT
alert
(Default) = "URL:Alert Protocol"
URL Protocol = ""
DefaultIcon
(Default) = "alert.exe,1"
shell
open
command
(Default) = "C:\Program Files\Alert\alert.exe" "%1"
Which would then be called by requesting a url with alert:YOURPARAMS, which would then call alert.exe YOURPARAMS.
I am trying to make a webpage which will have the entire inventory of servers that our team manages in the form of a table. I am using a simple LAMP stack and the inventory input as a CSV file.
The table has three columns: Hostname, IP address and device serial number.
While this works perfectly fine, I want to take this a step further and make every IP address in the table a hyperlink, clicking which will open an SSH client, which will connect to that IP address. Any cues to how this can be done? I was hoping there would be something like the the mailto: tag which opens an email client (Outlook window).
I've done it following the info of this blog post.
For future reference in case the original page becomes missing, here is the process:
you cannot directly map the ssh:// scheme to PuTTY, but you can map it to an intermediary script which will in turn launch PuTTY with the right arguments. Mine is called putty_ssh.bat and has the following content:
#echo off
set var=%1
set extract=%var:~6,-1%
start "C:\Program Files (x86)\PuTTY\putty.exe" %extract%
the script has to be registered in the registry. You can just create a ssh.reg file with the following content and open it (customizing last line as needed):
REGEDIT4
[HKEY_CLASSES_ROOT\ssh]
#="URL:ssh Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\ssh\shell]
[HKEY_CLASSES_ROOT\ssh\shell\open]
[HKEY_CLASSES_ROOT\ssh\shell\open\command]
#="\"C:\\path\\to\\putty_ssh.bat\" %1"
When I click on ssh:// links in web pages, it now opens PuTTY.
PuTTY unfortunately does not associate itself with the ssh:// or any other URLs.
You can associate an application with a protocol manually. But it's not trivial. For instructions, see below.
Easier way is to install WinSCP SFTP client. WinSCP 5.9 and newer registers itself to handle the ssh:// URL and opens the session specified by the URL in PuTTY.
So basically, if you just install WinSCP, it will make PuTTY handle the ssh:// URLs, without the below manual tweaks.
(I'm the author of WinSCP)
To register an application manually, see the MSDN article Registering an Application to a URI Scheme.
Basically you add a registry key like:
[HKEY_CLASSES_ROOT\ssh]
#="URL: SSH Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\ssh\DefaultIcon]
#="\"C:\\Program Files (x86)\\PuTTY\\PuTTY.exe\",0"
[HKEY_CLASSES_ROOT\ssh\shell]
[HKEY_CLASSES_ROOT\ssh\shell\open]
[HKEY_CLASSES_ROOT\ssh\shell\open\command]
#="\"C:\\Program Files (x86)\\PuTTY\\PuTTY.exe\""
Though the above passes a whole URL to the PuTTY command-line. And PuTTY does not understand the ssh:// prefix. So you would have to add a wrapper script that strips the ssh:// and passes only a user and a host to PuTTY.
For that see:
https://johnsofteng.wordpress.com/2009/05/12/launch-putty-from-browser/
I am using HTML 5 Geolocations API's for tracking location however I am getting the following error on the Geolocation icon in Chrome Browser
"This Page has been blocked from tracking your Location"
I went to the Preferences and Setting's Page but did not find any help.
In my case the problem was that I opened the HTML file from the file system (file:///...). Browsers generally try to prevent accessing personal information (which includes location) from local files, so you have to serve the file through a web server (even if it is local).
One simple way to serve a static website located in your filesystem is SimpleHTTPServer if you have Python installed. Just navigate to the folder using the command prompt, and say python -m SimpleHTTPServer, and then you can view the file on localhost:8000.
Even I was facing the same problem. One of the solution is to open to file in another browser, I tried in Firefox and it worked fine. Another solution is to open the file through your WAMP server (Local host).
There is a good article here about Geolocation API. You have to go to chrome://settings/content and there, you can find Location information. You should be able to find the exceptions and manage them there.