I have a R Shiny app running on a EC2 instance on AWS. The app can be accessed directly through its link.
I also have a Django app hosted on S3, which is accessing the app as an iframe.
What I want to do is limit the access of the Shiny App only through the Django app. Currently there is no limit on the EC2 instance security groups, and they listen ports 80 & 22.
Any ideas how I can do this?
I'd like the answer to be simple and say you just need to restrict the access to your Shiny app to the IP of your Django App but unfortunately you are using iframes.
As you are using an iframe, the content of that iframe needs to be accessible to whoever is accessing your Django app. If your Django app needs to be accessible from anywhere, the content of your iframe needs to be accessible from anywhere.
You can mitigate the access to the content of your Shiny app though. You can use the X-Frame-Options header to prevent your Shiny app from being embedded on other websites. You can set up nginx for example to serve your Shiny app and set these headers.
Here are some useful links:
https://security.stackexchange.com/questions/67889/why-do-browsers-enforce-the-same-origin-security-policy-on-iframes (about X-Frame-Options)
https://webmasters.stackexchange.com/questions/65619/protect-a-url-from-being-used-in-an-iframe-except-on-a-single-site (about Referer)
How to get parent URL in a shiny-app (same issue as you)
Related
I recently built a Django app that I am running on a Linux machine with Gunicorn and NGINX. The app is being run inside my company's network which is predominantly a windows environment. Currently, I am able to access the web app via the server's IP address. I know if it was a windows machine I could use the DNS to have it called by a DN. How accomplish this given that it's a Linux machine? For example, I would like to have the company users call the web app from a browser using http://analytics instead of its IP address. Would make the app much more user-friendly instead of always typing in the IP and just for best practice it's probably not secure to be showing the end user the IP anyways.
I have a Saas website that is developed using Django and the marketing site is also hand coded and running under django.
I would like to move the marketing site on the main domain to wordpress and then host the web application under an app subdomain.
However a number of pages that are important to our SEO are generated by the web application and appear on the main domain now.
eg.
example.com/service_page_1
example.com/service_page_2
Once I move the application to a subdomain these will be available at:
app.example.com/service_page_1
app.example.com/service_page_2
Is there a way example.com can be running a wordpress marketing site and these pages from the subdomain can be made available on the main domain?
I thought about hosting the content in iframes on the wordpress site but I am not sure how this would affect SEO.
The web application will be running behind an nginx web server.
Is there a way to proxy calls to certain routes on wordpress to my web application running behind nginx? (eg. www.example.com/service/*/ to display the page from my web application at app.example.com/service/*/)
I have one Django App. I want to get this app on World Wide Web.
Can anyone please help me with steps.
Like Some server addition(e.g. Apache or Nginx),Configuration of server,Integrating with Django,Web Hosting,etc.
Thanks
This at this link you will find a tutorial that helps you to deploy your app with NGINX
http://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html
simple and fast
In regards to hosting, you will have to get a domain name (unless you want to connect to your web page via IP address).
If you want to host your own web page from your server you will also have to set up your router to forward traffic to your server's IP. Having a static IP from your internet provider is preferable and also set your machine to have a static IP so you don't have problems with routing.
If you don't want the hassle of setting up a server environment all by yourself, you can also choose a PaaS provider like Heroku which supports Django applications out of the box. Hosting will cost more, but you will save time deploying your apps.
I have created a dynamic web page using HTML5 Css3 JS And django.
I have already bought a domain name.
Now i want to deploy my django project, but dont want to use any web host like heroku aws pythonanywhere etc.
All I could find on the web is how to configure apache and mod_wsgi to serve the files.
Is it possible to create a web hosting from my home ? If yes how ?
Using ubuntu server, apache & mod_wsgi or any other technology?
P.S. I dont want to use any web hosting company
So on your local computer you have to install webserver(apache, nginx or something else).
Then you have to specify a note of your domain name to your home ip address(it is better when you have static IP). If you will do this, all requests that will be in to your domain name will redirect to your home IP.
Then you have to configure your webserver.
I have a Facebook application hosted in Azure coded in c#. But configuration in my Facebook application asks for Hosting URL: that must be hosted in Heroku. So my application can't post actions to Facebook because this error always pops:
Given URL is not allowed by the Application configuration.
How is it supposed to work if I can't add my Azure URL: app.cloudapp.net as a hosting URL if only Heroku URLs are accepted.
Adding my applications's URL to the App Domains in application configuration hasn't helped either.
And strangely another application that I have works fine with no Hosting URL defined.
What I'm supposed to do to solve this, migrate everything to PHP? I know there can be another answer.