This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { NextApiRequest, NextApiResponse } from 'next' | |
| import { Readable } from 'node:stream' | |
| export default async function handler(req: NextApiRequest, res: NextApiResponse) { | |
| const { authorization } = req.headers | |
| if (!authorization || authorization !== process.env.AUTHORIZATION_HEADER) { | |
| return res.status(401).json({ error: 'Unauthorized' }) | |
| } | |
| const openAIUrl = process.env.OPENAI_URL as string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # UPDATED 17 February 2019 | |
| # Redirect all HTTP traffic to HTTPS | |
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name www.domain.com domain.com; | |
| return 301 https://$host$request_uri; | |
| } | |
| # SSL configuration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Change to name of TARGET-VM. | |
| $vm='CHANGE_ME' | |
| # Change to PCI device location (💡 Location). | |
| $Location = 'CHANGE_ME' | |
| # Enable CPU features. | |
| Set-VM -GuestControlledCacheTypes $true -VMName $vm | |
| # Host-Shutdown rule must be changed for the VM. | |
| Set-VM -Name $vm -AutomaticStopAction TurnOff |