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.
Related
I am using the "C4 DSL Extension" of VSCode to show previews of my architecture diagrams. The previews are rendered through the WebviewPanel. The source code can be found here: https://gitlab.com/systemticks/c4-grammar/-/blob/master/extension/src/c4-structurizr-preview.ts
It works through a direct connection, but once connected with my corporate network, all requests have to pass through a proxy. VSCode itself handles proxies through the http_proxy and https_proxy variables. However, the WebviewPanel does not seem to take those settings.
The following figure shows an excerpt of the console. You can see, that the request to query the "structurizr-embed.js" failed.
Is this behavior intended? I could not find a setting in VSCode to enable WebviewPanel to request via proxy.
Note: I am using the Linux version of VSCode.
I found a solution by setting the http.proxy variable in VSCode. We are using authentication for proxies and previously I exported the http_proxy environment variable in the form of http_proxy=http://<username>:<password>#<host>:<port>.
However, VSCode expects this variable without credentials: http_proxy=http://<host>:<port>. Now I don't understand where it talks the credentials from, but it works.
I've not been able to find straight forward instructions on how to avoid caching problems when developing a js app with vue cli.
For example, when we deploy a new version of the app with npm run build, we can see that a new app.xxxxx.js is deployed, where the xxxxxx part is a new hash that I guess webpack is generating.
We host this in an Windows 2012 IIS Server.
Now when I tell my customer we have solved the latest issues that have been found in the app, it seems that they have caching problems, as they still have the previous version, even if they close and reopen the browser.
Is there any way to avoid this behaviour?
Try to follow the below steps which help you to disable the cache in iis.
1)Open iis manager.
2)Select the site and click on the "HTTP response header feature".
3)Click on the set common header link from the action pane.
4)click the checkbox "expire web content" and select "immediately" radio button.
You could also set output caching in iis:
Configure IIS Output Caching
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
I'm using Chrome in a Docker container (published by SeleniumHQ) to run automated tests in the Cloud. This runs a minimal display environment on XVFB that you can VNC into to see results.
Now we're using this within a Corporate firewall - and so external requests need to go through a proxy. We're setting the proxy with the Selenium proxy command.
Now we've run a test on the command line with curl on the Chrome docker container and curl with the proxy can access external resources just fine. But Chrome has an unknown problem accessing external resources (internal are fine). When we try and look at the settings, it is locked out. (Something about not being about the render the settings on xvfb).
So I'm looking for a way to look at the settings similar to Firefox's about:config. Now obviously this doesn't work on Chrome, but there appear to be some similar things.
There appear to be some details on URLs to use here.
They suggest:
chrome://net-internals/proxyservice#events
chrome://net-internals/proxyservice.config#events
chrome://net-internals/proxyservice.init_log#events
chrome://net-internals/proxyservice.bad_proxies#events
My question is: How to view Chrome settings on XVFB?
One way to see the current preferences is to open the file scoped_dir5752_14079\Default\Preferences in the temporary folder once the session is started.
And for a list and description of the preferences :
https://chromium.googlesource.com/chromium/src/+/master/chrome/common/pref_names.cc
We have google chrome extension that needs to be used inside our organization. We have domains there.
Based on enterprise options the easiest approach for us is to host it on some internal web server, and then add address of that internal site as ExtensionInstallSources option to users PC via Group policies, but this does't work for me.
I've tried both registry and local Group Policy changes by adding Google Chrome adm\admx files.
Here is my registry change:
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallSources]
"1"="http://localhost/*"
When i'm checking chrome://policy - it displays that it loaded this settings. But when i open http://localhost/myextension.crx - Chrome still displays an error that extension can't be installed from there...
I'm using 47.0.2526.106 m (64-bit) under Windows 8.1 Enterprise (x64)
What i'm doing wrong here?
I have more complicated option to download chrome source\pdbs, and then try to debug it to get understanding why it's not working but it may take a lot of time, as Chrome can compile for a couple of hours on Windows at first build....
So apparently this registry change just wasn't enough. After debugging chrome source i found why it doesn't work for me. I missed:
The referer MUST be present and it also should be whitelisted. So if i open url for my extension by direct link, then as referer is missing - it won't install it. (Oh Chrome, at least you could say with message about it...). If i have web page that has link to that extension, and it's also whitelisted, then it will work fine.
Second missed point was that extension id MUST be present in ExtensionInstallWhitelist, otherwise Chrome will install it and with 2-3 seconds delay will disable it. But if you have listed it under ExtensionInstallWhitelist, then it will be fine.
So my final registry change for localhost is:
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallSources]
"1"="http://localhost/*"
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallWhitelist]
"1"="fhojekmcngnmkdbcoegjdlojgfngkpak"
I found it after long debugging in ExtensionManagement class - https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/extensions/extension_management.cc&q=ExtensionManagement::IsOffstoreInstallAllowed&sq=package:chromium&type=cs&l=148