In Superset, the URLs for sharing are generated with "127.0.0.1:8088" instead of the actual domain, except the "Share Query" button in SQL Lab - apache-superset

In Superset, there are several places where it's possible to share something: a chart, a dashboard, a specific section in a dashboard, etc.
Except the "Share Query" button in SQL Lab that works fine (i.e. generates a working URL with the actual domain) the other places where it's possible to generate a share URL are not working well for me (Superset version 0.35.2): in fact, the generated URLs are like http://127.0.0.1:80800/r/123
How can I have them working well as the "Share Query" button in SQL Lab?
(Also temporary hacks by modifying some file on the server would be a good solution at the moment).

Solved, the problem was the Host header not set by NGINX (used as reverse-proxy) when receiving the requests.

Related

Having 2 website on the same server using ember-simple-auth logs both out

I currently have 2 of the same site (one for production and the other is a development version) on one server and I have an issue with the ember-simple-auth for both of the site. Whenever I log in on one of the site, it works perfectly fine, the session works and everything works as expected. However, when I have both of the site open on different tabs (on the same browser and same window) and I try logging on one of them, they both log out creating an error in the console saying:
"The authenticator "authenticator:oauth2" rejected to restore the session - invalidating…"
On the other hand, when I have one of the site open on a regular browser and the other one on the same browser but in incognito (no caches), they both work perfectly fine (e.g. none of them logs out and everything works as expectedly). It works perfectly fine too if I open one site in one browser (such as Chrome) and the other site in a different browser (such as Safari).
My first guess is that these 2 different site has the same session used in cache but I could be wrong. If you have any idea on why this occur or you have a solution, please let me know.
Probably both sites are on the same origin and you use the local-storage session-store. Then both will use the ember_simple_auth:session localStorage key.
Probably the easiest thing could be to override the session-store and define a custom key that contains the information if its the dev or production build.
The probably easiest thing is to have both sites on different ports and/or domains so you have a different origin.

ColdFusion cfselect binding not working on production server

I have a few related selects that work perfectly on a testing server with very loose security (basically just a simple default install of CF 10).
I have tried to implement the CF 10 lockdown guide on the production server and all seems well, except that related select don't work. That is, the first select in the chain doesn't populate and therefore, none of the related selects populate either.
I even recreated Ben Forta's art media example: perfect on the testing server, no triggering in production.
All other CFC functions seem to work: SELECT and INSERT queries are just fine. Only CFSELECTs with bindings are hosed. I pretty sure that the problem is a server configuration. The same pages worked just fine on our old CF 9 box. Any ideas would be helpful.
My advice to you would be to NOT use cfselect or any other UI stuff in ColdFsuion - It only causes more headaches than it gets rid of.
That being said, if you followed the lockdown guide, you should have limited access to the CFIDE directory - which is needed for any of the ColdFusion UI stuff. There is an option in CF Admin to use a 'custom' path for the scripts ColdFusion uses - it is on the main Settings page. Set this value and create a virtual directory in IIS with the same name pointing to the {cfroot}CFIDE/scripts directory.

MS Access (2010) Enable Design View

I downloaded the Access template below for doing a home inventory:
http://office.microsoft.com/en-us/templates/results.aspx?qu=home%20inventory&ex=1&queryid=0d245f2a%2Dacdc%2D4161%2D92c8%2D8ba16a52ab32&AxInstalled=1&c=0#ai:TC101918100|
The design view is not visible, which is a bit of a nuisance.
Things I've tried:
1) In options/options/current database/ the check boxes (enable layout view & enable design changes for tables in Datasheet view) are both greyed out.
2) I've unblocked the file using Right-Click->Properties.
3) I've tried copying/exporting the objects to another database. But can only copy/export the tables.
4) I've tried holding shift when opening the DB.
5) Enabling all trust permissions etc.
None of these work
Does anybody have any suggestions. (I'm using Office 2010)
Thanks
I know this is an old thread, but just in case someone is still looking for an answer, this worked for me. I converted the Projects Web Database.
The process is as follows:
Create a blank "client" accdb database.
Import all web tables, client forms, client reports from the template web database into the blank client accdb database.
Close the client database and open the template web database.
(Now, you must individually create a client object from each web object. This can be a bit tedious.)
Highlight the web object (a web form, for example) that you want to create a corresponding client object. Click the File Tab, then Save & Publish, then Save Object As, and finally click the Save As Client Object button. Give the Client Object a different name than the web object (add Client to the end of the name, for example).
You will need to repeat these steps for each web query, web form, web report, and web macro in the template web database.
Once every web object has a corresponding client object in the template web database, open up the "client" database and import all client objects that you just created. Rename the objects to their original names (remove the word "client" if you took my suggestion above).
Now you should have a working template database that you can change to you liking.
Home inventory is set up as web forms and these do not have the same design view as the "normal" Access forms.
Albert Kallal says:
Unfortunately , there is no conversion utility.
However, you can use those web forms with VBA or so called Access
client forms.
Solution:
create a new blank database
import all of the tables, queries, reports, macros, etc using the import wizard

Iframe working correctly on localserver but not production server

A question like this was asked before and the person got nothing but criticisms, hope this won't be the case here.
I have a website that allows a business to add their menu to my site, and some have requested to be able to import a menu (a pdf or jpg) that is already online elsewhere. So I made a form that saves a url to the db and then that url is used in the src of an iframe on my site.
I tested it all and it worked fine on my local machine (using Django development server). When I synced it over to my production server and saved the same url I was testing with, the iframe loads no content.
I imagine that it has something to do with trying to read an individual file from another server because it works if I make the url google.com or to an image that is under my domain name. Is there anything I can do to fix this? Storing a url instead of a pdf in my db is much more efficient so doing this way is preferred over uploading their menu to my site.
I don't think this question needs any code attached, but if you want to see some let me hear it.
Thanks
The menu you're testing with probably has the X-Frame-Options response header set.
Is there a reason you're putting the image/pdf as the src on an iframe instead of just using the img tag (or putting an img tag inside your iframe)? There's still no guarantee that will work for all pages, as some sites will refuse to serve media to an external page, but I suspect this is your problem in this case.

GetOpenFileName lpstrInitialDir (directory)... not working for URL (SharePoint)

I bring up a GetOpenFileName dialog, enter a URL to a SharePoint sever, and it lets me browse that server using the Web Client Service (WebDAV mini-redirector). I am trying to get the initial directory to come up as that URL, but it seems to ignore it (using OPENFILENAME struct's lpstrInitialDir). Local paths work fine.
EDIT: Paul requested the form of the URL: it's http://doc.name.com I've also tried a trailing slash (both flavors) to see if that made a difference (saw some reference to that in another posted question). It didn't seem to.
EDIT2: This does work if I use the WebDAV address instead of the HTTP URL (i.e., \doc.name.com\DavWWWRoot. This doesn't solve my problem, as it's not a view of the site that users will recognize and will have difficulty working with.
If your application is for vista, you can use the IFileOpenDialog, which lets you use an IShellItem as the default location, and it should be pretty easy to create a shell item that points to the sharepoint URL.