Thanks to visit codestin.com
Credit goes to github.com

Skip to content

✔ The basic code for checking if a cState-powered status page (using its read-only API) has a status other than "fully operational."

License

Notifications You must be signed in to change notification settings

peteryang1756/html-embed

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cState alt logo

✔ The basic JavaScript code for checking if a cState-powered status page (using its read-only API).

There is no UI for this project, so you are you free to write that yourself or contribute so others can use it.

The index.js file has the JavaScript you can add to your page and use for making other things happen.

Prerequisites

  • You have a cState status page set up with a read-only API
  • You have modified your headers (for Netlify users, it's the netlify.toml file in the root) to allow for cross-origin access
  • Your browser (or environment) supports fetch()

The demo page uses this for its netlify.toml:

[[headers]]
    for = "/*.json"
    [headers.values]
      Access-Control-Allow-Origin = "*"

For vercel.json:

{
  "headers": [
    {
      "source": "/(.*)",
      "headers": [
        { "key": "Access-Control-Allow-Origin", "value": "*" },
        { "key": "Access-Control-Allow-Methods", "value": "GET,OPTIONS" },
        { "key": "Access-Control-Allow-Headers", "value": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" }
      ]
    }
  ]
}

License

The idea for this project was originally inspired by the GitHub / cState user @ririko5834.

Contributing rules same as on main cState repository

Licensed MIT, made by Mantas Vilčinskas since 2020. Thank you to all contributors.

About

✔ The basic code for checking if a cState-powered status page (using its read-only API) has a status other than "fully operational."

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%