Giter VIP home page Giter VIP logo

nitro-cors's Introduction

Hi, I'm Michael

I'm an astronomy ๐Ÿ”ญ enthusiast, completing my MSc in Astrophysics at University College London (UCL).

In my day job, I am a software-engineer in the space industry for Loft Orbital. We're currently working on delivering a constellation of satellites to orbit.

I'm a developer of some 10 years+ experience, specialising in both frontend and backend technologies. I'm a big fan of TypeScript, Go, and Vue.

observerly

I'm currently building observerly - a next-generation remote telescope and astronomical observation platform.

I'm currently building a fully tree-shakeable, zero-dependency TypeScript library for performing astrometric and astronomical calculations @observerly/astrometry.

I'm currently building a Go based framework for interoperating with images created by the ASCOM Alpaca API, called IRIS ๐Ÿ‘€ @observerly/iris.

I'm also currently building a Go based .FITS and .XSIF file reader and rendering, ported to the frontend using WASM. More details to come soon!

nitro-cors's People

Contributors

michealroberts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ikexing-cn

nitro-cors's Issues

feat: Add defineRequestMiddleware() object syntax event handler utility

Provide a onRequest object syntax event handler middleware function exposed as "cors", utilising the new defineRequestMiddleware from h3 v1.8.0 (reference: H3 1.8 - Towards the Edge of the Web! Object Syntax Event Handlers)

export const cors = (options: H3CorsOptions) =>
  defineRequestMiddleware(async event => {
    useCORS(event, options)

    const { origin } = getHeaders(event)

    if (origin && isCorsOriginAllowed(origin, options)) {
      setHeader(event, 'Origin', origin)
    }
  })

Include usage documentation as per the h3 recommendation:

export default eventHandler({
  onRequest: cors({
    origin: '*',
    methods: '*'
  }),
  async handler(event) {
    return `Hello, CORS!`
  }
})

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.