Uploading an exe file to github pages and allowing it to be used on the site? - github

Basically the title, I want to have a pretty simple exe file uploaded to my github pages website, and then allow it to be used on the site. Is this possible and if so how can i do it?

GitHub Pages provides only static sites. That is, a GitHub Pages site can contain only HTML, CSS, JavaScript and the like that are delivered without changes to the web browser. Like with all static site hosts, there is no backend server to perform operations on behalf of the user, including running executables of any sort, so that isn't possible here.
This is the case because GitHub does not want to run arbitrary code on behalf of users when rendering pages (which is a sensible approach in terms of security). Even if GitHub did support that, GitHub uses Linux, so exe files would be right out.

Related

Github only host for static website and not able to modify the website after it online?

Did Github hosting a website as static website?
Is that mean I do not able to make any changes to the website?
You must understand the difference between GitHub and GitHub Pages.
While using GitHub, you can store whatever you want (As long as it's legal). They are just files. You can delete, change and upload different files at any time.
While using GitHub Pages, the code stored on your GitHub repository will be available online. You cannot create a backend to your website in GitHub pages, they are "static". GitHub will just send the files you store in your repository to the people that visit the url, and the browser will display it as a website. You can change the files in your repository, and the website will be changed accordingly.

Static html css site deployed using github pages getting marked as dangerous by Chrome

I have deployed a simple static website with an html, css, js file and an assets folder on Github pages. It worked fine when it was deployed. But after some days, it is getting blocked by browser, and giving a security error. I have attached the screenshot of the error. Can someone help me to fix it? Thanks
Deceptive site ahead
Attackers on texnas1.github.io may trick you into doing something dangerous like installing software or revealing your personal information (for example, passwords, phone numbers, or credit cards)

Is it possible to restrict a static site to allow only access from cloud run (iframe embed)?

I have a React app running on google cloud run, with user authentications and permissions.
Now I would like to write documents for the app. The documents will be a static site holding at google cloud storage.
In the app, users with different permissions can access different routes of the app, and it would be great if the permissions work for documents too.
My untested solution is to control user access to the app routes, and certain route renders a page, that containing an <Iframe> which retrieves the documents and then display it.
My question is: is it possible to restrict access to the static site, to allow only access from the react app holding at cloud run?
Or is there any suggestion about access control of app documents?
"documents" were supposed to be html files converted from markdown files. They're documentations about what the app is and how to use the app.
And I don't want the part of the documentation about "admin configuration of the app" to be seen by users with regular authorization.
Holding the documentation as a static site is simpler. I can use gitbook (or other tools) to render the markdown file. Managing & rendering the styles of the markdown files in React would be a little painful.
I'm still working on my English. Sry about the confusions.
You can restrict the access to a static website in Cloud Storage by creating a redirect.html like it is posted in the second answer of this question. The complete medium post is located here.
This will work considering that the authentication from the static website will be separated from the Cloud Run authentication. As it can be seen here the permissions a user has will need to be defined for every object. There you can control if a certain document can be viewed by a specific user email.
If the serving of the Cloud Storage documents needs to be dependent on the Cloud Run authentication, then creating short-lifetime signed urls is an option. This is a python sample program to create signed urls and here is the description of what a signed url does.

I am using GitHub to host my website. Which is the most suitable Disqus platform to be used?

I am using GitHub to host my website. Which is the most suitable Disqus platform to be used to enable commenting system on my Website?
By Platform I mean :
WordPress
Universal Code
Joomla
Blogger
Tumblr
Squarespace etc.
If you're using GitHub Pages, you can't use any of those Web platforms you mentioned, because they all either presume you have your own hosting space or are hosted on their own infrastructure. If you want to use Tumblr, sign up for it. If you want to use Joomla, get a virtual private server.
GitHub Pages constrains you to Jekyll, plus a finite set of plugins. Which may be fine, if that's all you need. If your website doesn't need any sort of custom backend logic (e.g. a database), you can use GitHub Pages just fine. Disqus can be added to your site with just a little bit of JavaScript.
The reasons you'd want to use GitHub pages are worthy of a separate question, but in a nutshell you get a free static website.

.NET Web Forms multiple product subscriptions under one account?

Background:
I am working on a legacy ASP.NET 3.5 Web Forms applications. The application allows users to buy a subscription to a 'white-label' website which is generated for them and they can customize it further. It uses forms authentication.
A typical use-case is that the user creates an account on our system, purchases a website, and then proceeds to customize their website. The URL they will use to edit their purchased website is something like this: https://www.example.com/EditWebsite.aspx. There are many other pages also within our website editing toolbox with other URLs.
Problem:
My team has now been tasked with allowing people to use one account to access multiple website subscriptions. This means that one authenticated user could be trying to access one of many websites to edit if they use the URL mentioned above. Our system can be made aware of multiple subscriptionIds per User but the website editor web app only has support for one subscription.
To clarify with a simpler example: this would be like if Google all of a sudden allowed you to view two different inboxes with one GMail account. How would the system know which one you were trying to access if the URLs were the same for both?
We originally wanted to change the application to use URLs like: https://www.example.com/[subID]/EditWebsite.aspx which would give us all the information we need to send the user to the correct website. We looked into URL Routing to accomplish this but it seems that we would have to change all of the web app's internal links to use the route config to generate the correct URLs. Maybe we have the wrong idea here but it seems like too much work for a legacy application.
Another potential solution we came up with was simply using our systems' control panel web app (where they click links to edit any of their websites) to set a session cookie which our edit website web app can read to know which website to bring up. This has the disadvantage that the pages would not be bookmark-able and you could not look at multiple websites at once in different tabs of the same browser.
Question(s):
Is there any other options we have not investigated or thought of? Is there any other web sites which allow for this kind of behavior; how do they handle it? Is URL Routing the right way to do this and we just need to take the plunge?
Any input is appreciated!
The solution we ended up using was adding a URL parameter to the link which specifies which website you are trying to edit.
https://www.example.com/EditWebsite.aspx?subID=123
This parameter is included in the links to 'Edit Website' from the page which lists all of a user's websites.
When present, this sets a session cookie for the user. If the request parameter is not present, the app looks for the cookie being set; this handles all the internal links within the application. if a cookie doesn't exist and the request parameter was not set, we just pick the authenticated user's first subscription from the list.
This isn't perfect but it has worked without issue so far. The only consequence it has caused is that a user cannot edit multiple websites in the same browser session, e.g. using multiple tabs. This hasn't resulted in any support issues yet though so it is pretty much a non-issue.