Host Sinatra Web Site in Team City - sinatra

Whenever I open my team city triggered runs to looks at the results, I want to provide a tab where I can see my Ruby-Sinatra web server.
Ideally that should result in a Same Domain Error because team city tabs are i-frames, If I give a html page with a hyper link to the web server.
How can I go about it

For the Same Domain Issue, I set the X-Frame-Option to *, This way it worked in IE and Firefox as it explicitly understood the option. However in Chrome it did not understand the * option so bypassed it all together, which did the trick.

Related

Running local pages on iPhone via IP does not work for all pages

I have various wordpress sites via MAMP locally on my laptop. I can display one of them on my iPhone. But not the others. And I don't understand why it only works for the one.
I have done this:
Via System Preferences I checked the IP of my WLAN. In the browser (Safari) of the smartphone connected to the same WLAN, I entered the IP address and the port.
The start page, on which all my local Wordpress pages are displayed, is shown on my smartphone.
When I click on the link that leads to the corresponding page, only one page renders.
(This is the link with "Karma").
This is what it looks like when the page opens. (CSS and JS are not loaded, but I know what the problem is).
The problem now is that the other pages won't open. Safari says it can't connect to the server. I notice, that "localhost" instead of the IP adress is displayed in the browser – but I don't know whether this is relevant and I don't know - how to proceed to find the mistake.
All the pages are in subdirectories of htdocs - as usual with MAMP.
I have entered the whole thing both with and without the protocol specification in front of the IP address. (http / https)
Even if I want to access the other pages directly by putting the directory name after the port, it only works for the Karma page).
So:
123.456.789:8888/karma works
123.456.789:8888/gwhh does not work.
Everything seems to be the same. I don't know how to even proceed to find the error. I have tried different networks and browsers.
Thank you.

how to redirect IE to Edge like youtube, twitter, stackoverflow without permission [duplicate]

When you navigate to https://stackoverflow.com in IE11, it redirects the user to Edge with the following tab open: https://support.microsoft.com/en-us/office/the-website-you-were-trying-to-reach-doesn-t-work-with-internet-explorer-8f5fc675-cd47-414c-9535-12821ddfc554?ui=en-us&rs=en-us&ad=us
How do I implement this in my own site? Is there a meta tag that can enable this?
EDIT: Here's a clip of what it looks like. Tried on Windows 10. https://streamable.com/nwtt22
Ah yes, I wondered this too, and also assumed to be a browser only thing.
Sure enough!
It's the ie_to_edge_bho (Browser Helper Object) DLL file found in the Edge Program files.
I was curious enough to Hex edit the DLL file and found the URL in which it pulls these approved sites from... almost like a master/default list.
Yes, it's built into the BHO, no it's not stored locally from what I can tell.
(Screenshot of Hex editor)
Here is the link: https://go.microsoft.com/fwlink/?linkid=2133855
Which forwards to https://edge.microsoft.com/neededge/v1
I have no idea how you get your own site on this list, but I figured I would add this information. :)
I was wondering this too. After reading Joshua Joppie's answer, I did some Googling and found this webpage.
Turns out, you need to e-mail Microsoft to get your site added to the Edge-only list (how to do so is explained on that page). I'm not sure if they'll take a request from anyone, or whether you need to be a big website, like Stack Overflow. It's worth trying anyway, as the only requirement they give is this:
The IE compatibility list is designed to work with public sites only.
To be honest, I've no idea why they didn't just make a <meta> tag for it. It would be much easier.
If I have time (which I doubt), I plan to make a JS programme that mimics the functionality of a website's presence on this list and I will link to it here. You could always do a user agent check that redirects the user to microsoft-edge:https://example.com (where example.com is your website) if it detects them using Internet Explorer.
Need to add the below script in the head tag to redirect your website in Edge browser
<script>
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
window.location = 'microsoft-edge:' + window.location;
setTimeout(function() {
window.open('', '_self', '').close();
// window.location = 'https://support.microsoft.com/en-us/topic/we-recommend-viewing-this-website-in-microsoft-edge-160fa918-d581-4932-9e4e-1075c4713595?ui=en-us&rs=en-us&ad=us';
}, 0);
}
</script>
This is controlled by Edge Chromium group policy not code. You can refer to the steps below to set the group policy to achieve the goal:
1. Send all sites not included in the Enterprise Mode Site List to Microsoft Edge
This setting lets you decide whether to open all sites not included in the Enterprise Mode Site List in Microsoft Edge. If you use this setting, you must also turn on the Administrative Templates\Windows Components\Internet Explorer\Use the Enterprise Mode IE website list policy setting and you must include at least one site in the Enterprise Mode Site List.
Open Group Policy Editor.
Click Computer Configuration > Administrative Tools > Windows Components > Internet Explorer.
Double-click Send all sites not included in the Enterprise Mode Site List to Microsoft Edge.
Select Enabled.
Click OK or Apply to save these settings.
2. Configure which channel of Microsoft Edge to use for opening redirected sites
This policy enables you to configure up to three versions of Microsoft Edge to open a redirected site (in order of preference).
In the same path of Group Policy Editor, double-click Configure which channel of Microsoft Edge to use for opening redirected sites.
Select Enabled.
Under Options, select your top three choices for the channel to use - Internet Explorer will redirect to the highest ranked choice that the user has installed on that device:
Microsoft Edge Stable
Microsoft Edge Beta version 77 or later
Microsoft Edge Dev version 77 or later
Microsoft Edge Canary version 77 or later
Microsoft Edge version 45 or earlier
Click OK or Apply to save these settings.
3. Use the Enterprise Mode IE website list
This policy setting lets you specify where to find the list of websites you want opened using Enterprise Mode IE.
Create or reuse a Site List XML. Sample file is like below:
site.xml:
<site-list version="8">
<created-by>
<tool>EMIESiteListManager</tool>
<version>10.0.14357.1004</version>
<date-created>08/20/2020 07:45:39</date-created>
</created-by>
<site url="www.example.com">
<compat-mode>IE7</compat-mode>
<open-in>IE11</open-in>
</site>
</site-list>
In the same path of Group Policy Editor, double-click Use the Enterprise Mode IE website list.
Select Enabled.
Under Options, type the location of website list. If it's in local, you can set it like this: file://D:/site.xml.
Click OK or Apply to save these settings.
It's quite simple to add your domain to the redirection list.
https://learn.microsoft.com/en-us/microsoft-edge/web-platform/ie-to-microsoft-edge-redirection#request-an-update-to-the-ie-compatibility-list
https://learn.microsoft.com/en-us/deployedge/edge-learnmore-neededge
Request an update to the IE compatibility list The IE compatibility
list is an XML file on microsoft.com. The list is regularly updated in
response to user and website developer requests to have websites added
or removed. Updates to the list are automatically downloaded to user
machines.
Email the following information to ietoedge#microsoft.com for your
website to be added or removed from the IE compatibility list.
Owner name Corporate title Email address Company name Street address
Website address
I'm fairly certain that Microsoft checks its "Enterprise Mode Site List" in order to decide whether to open the webpage or direct users to Edge. You can find more information about it here: https://learn.microsoft.com/en-us/internet-explorer/ie11-deploy-guide/what-is-enterprise-mode

FMP URL Format in Filemaker WebDirect

I am trying to use some webviewers on Filemaker WebDirect. I would like to call a script in filemaker from a button on the webviewer. It works great in pro but I'm not sure of the url protocal I need to use in web direct. What is the format I should use when trying to call a filemaker script from a webviewer in webdirect?
You'll need to test this out because I haven't tested it, but I believe that when you use a webviewer in a WebDirect solution the webviewer actually displays an iframe tag and the contents of the webviewer works like any other iframe on a webpage, i.e. it's no longer part of the WebDirect application.
You can check it out in the browser interface of your WebDirect solution by right-clicking on the webviewer and selecting "inspect element". That should open up the browser's developer tools and show you the webviewer's element in the overall HTML structure. The webviewer should be an iframe.
All of that said, if it does treat the content of the webviewer as an iframe and therefore the content of the iframe is outside of your WebDirect solution, it means that whatever communication you have from the webviewer content would need to communicate externally with your FileMaker Solution via XML custom web publishing. It would be like standing inside of your house, reaching out of a window, unlocking your front door, and grabbing something you want.
This means you would need:
Web Publishing turned on on your FileMaker Server
A user with the xml extended privileges enabled
An external IP address that you can access your FileMaker Server by
Then you could (again, theoretically I have not tried doing this) use a link that contains a url with the XML custom web publishing syntax to perform the script. You can find a description of the syntax in the FileMaker Server documentation PDF fms13_cwp_xml.pdf. I can't find a good link to the syntax online at the moment, but you could search around for it. The basic syntax outlined in the PDF is:
<scheme>://<host>[:<port>]/fmi/xml/<xml_grammar>.xml[?<query string>]
and calling a script would look like:
http://myfmsdomainname.com/fmi/xml/fmresultset.xml?-script=theScriptIwantToFire
My url structure could be off.
Anyway, it sounds like it could be a pain in the ass, but it may be a solution! Good luck!
This is tricky because you will have to communicate with the Webdirect client via FMServer!
Use the FMServer PHP interface for your webpage within the webviewer to communicate to the server. Your web page can either:
1) Directly set a value in the server that your client will monitor
2) If it has to call a script then call a script on the server, your client will still have to monitor a value. e.g. use the php API on your webpage. Setup your database connection (see the API docs in your FMServer folder for an example), then call:
$newperformscript =& $fm->newPerformScriptCommand($layoutName, 'scriptname',$scriptParameters);
$result = $newPerformScript->execute();
Your Webdirect Client will then need to monitor for that change. While Webdirect is on the layout with the webviewer, your client could use the filemaker script step to actively monitor for a change in value via a timer:
Install OnTimer [Interval:secs]
When your client detects that change that you made then perform your action.
Note: You will have to pass an ID of the client to the webviewer, and your webviewer will have to pass that ID back to the server, and your client will have to monitor for that ID so that all clients don't respond to the change. You can pass whichever client ID you choose to use to the webviewer via the URL using GET.
If your server is local then the change will be detected in one second if that is what your Install OnTimer timer is set to.
What you are doing is far from ideal with Filemaker... I suggest that you look into a different UI paradigm if possible.

facebook Error App Domain: [IP Address] is not a valid domain.?

I give my production server IP address as App domain in facebook application but it's not saved. It returns error as App domain is not valid. So that I cannot use my facebook connect API.
Can we give IP address as App domain in FB application? If it's not, what is the other way to do?
No, it looks like the app domain can only be a domain and not an ip address.
For example in the app settings page, near the App Domain hover the '?' and see:
Enable auth on domains and subdomain(s)
Also, I found this page: http://developers.facebook.com/docs/appproperties/ it refers to the REST api and so it's not that up to date, but it clearly states there that there are two different properties: base_domain(s) and ip_list.
I suggest that you try to put a normal domain and see what happens.
All Wrong answers. Here is the true
You must click (+ add platform)
then Select Platform choose app I select website the planet icon
Enter
Site URL http://www.yoursitehere.com
Mobile Site URL http://www.yoursitehere.com
go back and enter in App Domains: yoursitehere.com
now click save
go to Status and Review
Do you want to make this app and all its live features available to the general public?
change or move to (YES)
This is what I found works.
From the Facebook development page "Apps-YourAppName", click on Basic in the LEFT Nav.
There are 3 sections on this page: Basic Info, Cloud Services, and "Select how your app integrates with Facebook"
In the Select how your app integrates with Facebook section, select "Website"
Enter your fully qualified domain name in the Site URL dialog box. Example: http://www.mydomain.com OR http://mydomain.com (my site does not include the www so I didn't add it).
At the bottom of the page click the "Save Changes" button. You may receive a notice that it may take several minutes to blah blah blah....but you can continue with the next steps immediately.
Now, in the Basic Information section at the top of this screen, you can now add your App Domain. This should be formatted as mydomain.com. Do not add "http://" and do not add "/" at the end of the domain name.
NOTE: My site does not use the www, so I cannot confirm that it's required in Step #6. Try it both ways if you're unsure.
At the bottom of the page click the "Save Changes" button. You may receive a notice that it may take several minutes to blah blah blah....but you can continue with the next steps immediately.
At this point the error was NOT displayed as it was before.
Hope this helps!
One solution to getting over the problem of using an IP address as a valid domain is to use: xip.io
xip.io is a magic domain name that provides wildcard DNS
for any IP address
Simply add .xip.io after your url and use this as the domain name. Perfect for me as I do my development on a virtual machine!
If you don't have a domain (only the IP) just leave the "App Domains" field in blank. It works! =)
This, IMHO, is Facebook's fault as the error message is really confusing and makes you think only domains are allowed.
Hope it helps someone! =)

How to redirect 404

For example in past my website look like this:
Example: www.mywebsite.com/keyword
Now look like this:
Example: www.mywebsite.com/search.php?q=keyword
How can i redirect people who search for a specific tag to my new link?
From "www.mywebsite.com/keyword" to "www.mywebsite.com/search.php?q=keyword"
I'm not so good with coding so based to my examples can somebody make the code that need to be inserted in htaccess file pls.
This are the examples of links:
OLD: www.mywebsite.com/keyword
NEW: www.mywebsite.com/search.php?q=keyword
That redirecting is called URL Rewriting, and is usually done via a .htaccess file for Apache, or with magic if you're using Lighttpd.
I would take a look at this website, which more or less explains how to do it (assuming you're running Apache): http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html
The specific details depend on the web server being used (IIS, Apache, etc.) but basically you could configure those to redirect to a specific web page and extract the keyword from the original URL and place it in the query string parameter list.
For example, in IIS you would do the following:
Start > Programs > Administrative Tools > Internet Services Manager
Select your web site from the list and right-click to go Properties.
The Custom Errors tab is where you will see a list of HTTP errors.
Select the "404" page and "Edit Properties" to point this to a web page of your choosing.
The last step is where you will plug in your custom code that will handle the redirect.